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 receivers

List of recievers

STRING sender

Sender

RECORD ARRAY mimeheaders

MIME headers

RECORD toppart

MIME message top-part

RECORD options

Options

rawheaders

Return value

RECORD

Response

RECORD ARRAY failures

List of recipients that were not accepted

INTEGER failures.code

Error code (eg 442)

STRING failures.receiver

Receiver address

STRING failures.test

Error message

STRING message

Error message (set when #SendMessage.return.success is false)

STRING smtpserverip

Address of the remote server (in format host:port)

BOOLEAN success

Whether sending the message was sent to at least one of the recipients