Javascript Misc email

From FreeSWITCH Wiki
Jump to: navigation, search

Sends an email from within your application

Synopsis

email(to, from, headers, body, [<filename>]);

Where:

  • from - from email address
  • to - to email address
  • headers - optional headers (i.e. "Subject: yadayada")
  • body - body of email message
  • filename - optional filename to attach

Example

if (eMailTo != "") {
	var tmp_eMailSubject = eMailSubject + sv_caller_id_name + " (" + sv_caller_id_num + ")";
	email(eMailTo, eMailFrom, "Subject: " + tmp_eMailSubject, eMailBody, tmp_Filename);
}

See Also