Overview
Creates a new message instance to be sent.Message $Messages.New()
Example
Send a messagevar msg = $Messages.New( 'user@host.com' , 'remember' , 'Remember the milk!.' ); msg.Send();
Example
Multiple Recipientsvar msg = $Messages.New(); msg.Subject = $Xml.Evaluate('Dispatch/Subject'); msg.Body = $Xml.Evaluate('Dispatch/Body'); msg.DeleteAfter = $Calendar.AddDays($Calendar.Today,30); $Xml.SelectAll("To/Address", function(adr) { var type = adr.Evaluate('Type/Code'); if (type === 'To') { msg.To(adr.Evaluate('EMailAddress')); } else if (type === 'CC') { msg.CC(adr.Evaluate('EMailAddress')); } else if (type === 'BCC') { msg.BCC(adr.Evaluate('EMailAddress')); } }); $Xml.SelectAll("Attachments/Attachment", function(att) { msg.AttachFile(att.Evaluate('File')); }); msg.Send();
Examples
Send a messagevar msg = $Messages.New( 'user@host.com' , 'remember' , 'Remember the milk!.' ); msg.Send();
var msg = $Messages.New(); msg.Subject = $Xml.Evaluate('Dispatch/Subject'); msg.Body = $Xml.Evaluate('Dispatch/Body'); msg.DeleteAfter = $Calendar.AddDays($Calendar.Today,30); $Xml.SelectAll("To/Address", function(adr) { var type = adr.Evaluate('Type/Code'); if (type === 'To') { msg.To(adr.Evaluate('EMailAddress')); } else if (type === 'CC') { msg.CC(adr.Evaluate('EMailAddress')); } else if (type === 'BCC') { msg.BCC(adr.Evaluate('EMailAddress')); } }); $Xml.SelectAll("Attachments/Attachment", function(att) { msg.AttachFile(att.Evaluate('File')); }); msg.Send();