Text and text files to include in the message body may be specified as well as binary attachments.
Attribute | Description | Required |
---|
from | Email address of sender. | True |
tolist | Comma- or semicolon-separated list of recipient email addresses. | True |
cclist | Comma- or semicolon-separated list of CC: recipient email addresses. | False |
bcclist | Comma- or semicolon-separated list of BCC: recipient email addresses. | False |
mailhost | Host name of mail server. Defaults to "localhost." | False |
message | Text to send in body of email message. | False |
subject | Text to send in subject line of email message. | False |
format | Format of the message body. Valid values are "Html" or "Text." Defaults to "Text." | False |
files | Name(s) of text files to send as part of body of the email message. Multiple filenames are comma- or semicolon-separated. | False |
attachments | Name(s) of files to send as attachments to email message. Multiple filenames are comma- or semicolon-separated. | False |
failonerror | Determines whether task failure stops the build or is just reported. Default is "true." | False |
verbose | Task reports detailed build log messages. Default is "false." | False |
if | If true then the task will be executed; otherwise skipped. Default is "true." | False |
unless | Opposite of if. If false then the task will be executed; otherwise skipped. Default is "false." | False |
<mail
from="nAnt@sourceforge.net"
tolist="recipient1@sourceforge.net"
cclist="recipient2@sourceforge.net"
bcclist="recipient3@sourceforge.net"
subject="Msg 7: With attachments"
files="body1.txt,body2.txt;body3.txt,body4.txt"
attachments="body1.txt,body2.txt;,body3.txt"
mailhost="smtpserver.anywhere.com"/>