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 originOriginating module
STRING ARRAY receiversArray of email addresses of the receivers (all To, Cc and Bcc recipients)
STRING senderEmail address of the sender
RECORD ARRAY mimeheadersHeaders to send with the message (including From, To, etc headers, but without any Bcc headers)
RECORD toppartTop-level part of the MIME message to send
RECORD optionsOptions
BOOLEAN ignorerecipientwhitelistDon't honor the recipient whitelist. This should only be used for user-triggered emails (eg password reset)
DATETIME notbeforeScheduled date after which the mail can be sent
STRING priorityMail task priority. Defaults to 'interactive'. Set to 'normal' or 'background' for mass/bulk mails (which shouldn't block eg. password resets)
BOOLEAN rawheadersNo postprocessing of headers like To, Subject
BOOLEAN replytofallsbacktorecipientSet Reply-To to match the recipient of each mail (even bccs) if the Reply-To is empty
BOOLEAN sensitiveMark this mail as sensitive, hide it to non-sysops
STRING statuscallbackCallback function to invoke when receiving status updates for this mail (eg bounce, delivery, complaint)
STRING statusdataInformational string passed to the status callback
Return value
INTEGER ARRAYIDs of the generated task, one per receiver