Send an eMail.
First available in version 3.0 build 2039.
from - [Optional] - Sender's name/address. Most SMTP servers require a 'from' address so if you don't supply one the send operation could fail.
to - Recipient name/address.
subject - [Optional] - Text to appear as the subject of the email.
body - [Optional] - Text to appear as the email message body (may contain line breaks).
server - [Optional] - The SMTP server that accepts mail for the 'to' address.
timeout - [Optional] - Timeout, in seconds, for DNS lookups. Default value is 60.
bodyFormat - [Optional] - Indicates the format of the body. 'Simple' mail messages cannot have attachments. Valid values include: Text,HTML,Simple. Default value is Text.
headers - [Optional] - Optional field that allows you to provide additional SMTP header fields like reply-to, comments or anything else defined in RFC822. Each header you add should be separated by newlines ('\n').
readReceiptTo - [Optional] - Email address to send read-receipt to.
attachments - [Optional] - A list of files to attach, separated by newlines ('\n'). Ignored when sending 'Simple' email.
importance - [Optional] - Normal or high priority. Valid values include: Normal,High. Default value is Normal.
charset - [Optional] - Character set to use in the Content-Type declarations. Default value is iso-8859-1.
result - A record of the communications between the plugin and email server.
This method can only be called asynchronously.
The from and to parameters each accept only a single name/address. Attempting to supply a list of addresses will lead to send failures. Name/address entries can be formatted as follows:
- "Joe User"<email@example.com>
Given the nature of eMail, it is important to note that the call to EMail.send could fail for a number of reasons beyond your control. Quite often, as in the case of busy eMail servers, retrying the identical operation after a short while will result in success.
Some Internet Service Providers (ISPs) block certain attempts to directly send eMail over their network. In this scenario, it may be necessary to specify the ISP's eMail server in the server parameter.