Semantics : MailStatement

MailStatement  ::=  sendMail ( Expr )?
( from | to | cc | bcc | subject | attach | body | htmlBody ) ( Expr )?
: ( Expr | HereDoc ) )+ ;

Used by:  

This statement sends e-mails to one or more recipients. Before calling this command, you must connect to the mail server with connectMailServer() system function, and when done, call disconnectMailServer(). The message body may be in plain text, HTML or both. The message body, HTML body and addresses can be in different character-sets, designated by their respective optional Expr's. The optional Expr following sendMail is the default character-set.

The from clause is required and should be a string for the sender's e-mail address. The subject clause takes a string just for that. The to , cc and bcc clauses lists the recipients; they are strings contain comma-separated e-mail addresses. The to and from are required. E-mail addresses can be followed by sender or recipient names quoted in < and >.

The optional attach clause takes a string that contains file names separated by commas, to be attached to the message.