SMTPConnection::SendMessage (open)
Runs the complete flow for sending an e-mail
Syntax
LOADLIB "wh::internet/smtp.whlib";
RECORD FUNCTION SendMessage(STRING ARRAY receivers, STRING sender, RECORD ARRAY mimeheaders, RECORD toppart, RECORD options)Parameters
STRING ARRAY receiversList of recievers
STRING senderSender
RECORD ARRAY mimeheadersMIME headers
RECORD toppartMIME message top-part
RECORD optionsOptions
rawheadersReturn value
RECORDResponse
RECORD ARRAY failuresList of recipients that were not accepted
INTEGER failures.codeError code (eg 442)
STRING failures.receiverReceiver address
STRING failures.testError message
STRING messageError message (set when #SendMessage.return.success is false)
STRING smtpserveripAddress of the remote server (in format host:port)
BOOLEAN successWhether sending the message was sent to at least one of the recipients