<mail>

[This is preliminary documentation and subject to change.]

Sends an SMTP message.

Text and text files to include in the message body may be specified as well as binary attachments.

Parameters

Attribute Type Description Required
from string Email address of sender. True
bcclist string Semicolon-separated list of BCC: recipient email addresses. False
cclist string Semicolon-separated list of CC: recipient email addresses. False
format MailFormat Deprecated. Format of the message. The default is Text. False
isbodyhtml bool Indicates whether or not the body of the email is in html format. The default value is false. False
mailhost string Host name of mail server. The default is localhost. False
mailport int The port number used to connect to the mail server. The default is 25. False
message string Text to send in body of email message. False
password string The password to use when connecting to the smtp host. False
replyto string Reply to email address. False
ssl bool Indicates whether or not ssl should be used to connect to the smtp host. False
subject string Text to send in subject line of email message. False
tolist string Semicolon-separated list of recipient email addresses. False
user string The username to use when connecting to the smtp host. False
failonerror bool Determines if task failure stops the build, or is just reported. The default is true. False
if bool If true then the task will be executed; otherwise, skipped. The default is true. False
unless bool Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. False
verbose bool Determines whether the task should report detailed build log messages. The default is false. False

Nested Elements:

<files>

Files that are transmitted as part of the body of the email message.

</files>

<attachments>

Attachments that are transmitted with the message.

</attachments>

Examples

Requirements

Assembly: NAnt.Core (0.92.4509.0)