SendSMTPSingleMessage (open)
Simple mail send function
Syntax
LOADLIB "wh::internet/smtp.whlib";
RECORD FUNCTION SendSMTPSingleMessage(STRING mailserver, STRING mailfrom, STRING ARRAY mailto, STRING ARRAY mailcc, STRING ARRAY mailbcc, STRING subject, STRING messagetext, RECORD ARRAY attachments)Parameters
STRING mailserverHostname and optional port number of the mailserver (eg "mail.b-lex.com" or "testmail.example.org:2525")
STRING mailfromFrom email address and name
STRING ARRAY mailtoA string array of recipients to put in the To header
STRING ARRAY mailccA string array of recipients to put in the Cc header (Carbon Copy)
STRING ARRAY mailbccA string array of recipients which will not be mentioned in the header (Blind Carbon Copy)
STRING subjectThe subject of the message
STRING messagetextThe raw text of the message (separating individual lines with \r\n is recommended)
RECORD ARRAY attachmentsRecord array of attachments of (name, contenttype, data)
Return value
RECORDA record describing success or failure after sending the message
errcodeSMTP error code, if a global error occured
errmsgSMTP error message, if a global error occured
failuresA record array of (STRING receiver, INTEGER code, STRING text) detailing any partial delivery failures
successIf true, at least one receiver was accepted by the SMTP server