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 mailserver
Hostname and optional port number of the mailserver (eg "mail.b-lex.com" or "testmail.example.org:2525")
STRING mailfrom
From email address and name
STRING ARRAY mailto
A string array of recipients to put in the To header
STRING ARRAY mailcc
A string array of recipients to put in the Cc header (Carbon Copy)
STRING ARRAY mailbcc
A string array of recipients which will not be mentioned in the header (Blind Carbon Copy)
STRING subject
The subject of the message
STRING messagetext
The raw text of the message (separating individual lines with \r\n is recommended)
RECORD ARRAY attachments
Record array of attachments of (name, contenttype, data)
Return value
RECORD
A record describing success or failure after sending the message
errcode
SMTP error code, if a global error occured
errmsg
SMTP error message, if a global error occured
failures
A record array of (STRING receiver, INTEGER code, STRING text) detailing any partial delivery failures
success
If true, at least one receiver was accepted by the SMTP server