Documentation
sendhtmlmail
usage
void sendhtmlmail ( string sender , string sender_email , string recipient , string recipient_email , string subject , string html [, string text_alt [, string path_to_file ] ]);
paramètres
sender : the name (e.g.: firstname, lastname) of the sender
sender_email : the e-mail adress of the sender
recipient : the name (e.g.: firstname, lastname) of the recipient
recipient_email : the e-mail adress of the recipient
subject : the subject of the e-mail
html : the html code to send
text_alt : an alternative text version
path_to_file : the path to a file you want to send as an attachment
You provide an HTML version of your mail and eventually an alternative plaintext. If you don't provide an alternative plaintext version, one will be generated by the function.
Know more about send e-mails in PHP by consulting the complete examples.
If you wish to send e-mails in NQL, use the NQL SERVERMAIL command. It allows multiple recipients, multiple cc, attachments and is logged in Files/log.txt (allowing easier debug).
exemples
$result = query("<QUERY>...</QUERY>");
$html = transform($result,"Mail.xsl");
sendHTMLMail( "John Doe" , "john.doe@mycompany.com" , "Jim Smith" , "jim.smith@institution.org" , "Hello" , $html );