Description
The SendMail
method sends an e-mail message to the specified address. It also lets you specify the files that must be sent with this message as attachments.
This method is available if the BuiltIn plugin is installed and enabled. The plugin is installed and enabled by default.
Declaration
BuiltIn.SendMail(PortNumber, ToAddress, FromHost, FromName, FromAddress, Subject, Body, FileName1, FileName2, ...)
PortNumber | [in] | Optional | String | |
ToAddress | [in] | Required | String | |
FromHost | [in] | Required | String | |
FromName | [in] | Required | String | |
FromAddress | [in] | Required | String | |
Subject | [in] | Required | String | |
Body | [in] | Required | String | |
FileName1 | [in] | Optional | String | |
FileName2 | [in] | Optional | String | ... |
Result | Boolean |
Applies To
The method is applied to the following object:
Parameters
The method has the following parameters:
PortNumber
The valid port number between 1 and 65353 (by default set to 25).
ToAddress
The e-mail address to which the message will be sent. You can specify several addresses separated by commas or semicolons.
FromHost
The host from which the message will be sent.
FromName
The “user-friendly” name of the e-mail sender. If it is not necessary to specify the name, you should pass an empty string to this parameter.
FromAddress
The e-mail address from which the message will be sent.
Subject
The message subject.
Body
The message body.
The full paths to the files you want to send with the message.
Result Value
True if the message was sent successfully, and False otherwise.
Example
See an example in Sending Email From Scripts.