QueueMailInWork (open)
This function puts a message in the WebHare mail queue in the current work, and send it to the standard mail server
Syntax
LOADLIB "mod::system/lib/mailer.whlib";
INTEGER ARRAY FUNCTION QueueMailInWork(STRING origin, STRING ARRAY receivers, STRING sender, RECORD ARRAY mimeheaders, RECORD toppart, RECORD options)
Parameters
STRING origin
Originating module
STRING ARRAY receivers
Array of email addresses of the receivers (all To, Cc and Bcc recipients)
STRING sender
Email address of the sender
RECORD ARRAY mimeheaders
Headers to send with the message (including From, To, etc headers, but without any Bcc headers)
RECORD toppart
Top-level part of the MIME message to send
RECORD options
Options
BOOLEAN ignorerecipientwhitelist
Don't honor the recipient whitelist. This should only be used for user-triggered emails (eg password reset)
DATETIME notbefore
Scheduled date after which the mail can be sent
STRING priority
Mail task priority. Defaults to 'interactive'. Set to 'normal' or 'background' for mass/bulk mails (which shouldn't block eg. password resets)
BOOLEAN rawheaders
No postprocessing of headers like To, Subject
BOOLEAN replytofallsbacktorecipient
Set Reply-To to match the recipient of each mail (even bccs) if the Reply-To is empty
BOOLEAN sensitive
Mark this mail as sensitive, hide it to non-sysops
STRING statuscallback
Callback function to invoke when receiving status updates for this mail (eg bounce, delivery, complaint)
STRING statusdata
Informational string passed to the status callback
Return value
INTEGER ARRAY
IDs of the generated task, one per receiver