Method Protocols.SMTP.AsyncClient()->simple_mail()
- Method
simple_mail
voidsimple_mail(stringto,stringsubject,stringfrom,stringmsg,function(:void)|voidcb,mixed...args)- Description
Sends an e-mail. Wrapper function that uses send_message.
- Note
Some important headers are set to:
"Content-Type: text/plain; charset=iso-8859-1"and"Content-Transfer-Encoding: 8bit"."Date:"header isn't used at all.When the message is successfully sent, the callback will be called (
cb(1, @args);).When the message cannot be sent,
cbwill be called in one of the following ways:cb(({ 1, errno(), error_string, int(0..1) direct }), @args);cb(({ 0, smtp-errorcode, error_string, int(0..1) direct }), @args);
where direct will be
1if this particular message caused the error and0otherwise.