ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Praveen" <>
Subject RE: Ant 1.6.2 email with attachmennt
Date Fri, 27 Aug 2004 08:53:05 GMT

	I suggest u to use "mimemail" task instead of "mail" task.  U can find out
the attributes and the nesting of other elements/ data types in the text
given below. I hope u'll get the required result. U can find the same text
in the ANT- TheDefinitiveguide.pdf file which is available at Check that out.

mimemail :-

Sends SMTP mail with MIME attachments. This task requires the JavaMail API
and the
JavaBeans Activation Framework. This differs from the core mail task in that
it supports

bcclist (1.4, String, *)
A comma-delimited list of BCC recipients.
cclist (1.4, String, *)
A comma-delimited list of CC recipients.
failonerror (1.4, boolean, N)
If true, abort the build on failure. Defaults to true.
from (1.4, String, Y)
The sender's email address.
mailhost (1.4, String, N)
The mail server name. Defaults to localhost.
message (1.4, String, *)
The message body.
messagefile (1.4, File, *)
A file containing the message body.
messagemimetype (1.4, String, N)
MIME type of attached message when using message or messagefile attributes.
Defaults to text/plain.
subject (1.4, String, N)
The email subject line.
Ant: The Definitive Guide
tolist (1.4, String, *)
A comma-delimited list of TO recipients.
Specify exactly one of message or messageFile, or specify a nested
<fileset>. At least one
of tolist, cclist, or bcclist must be specified.
0..n nested <fileset> elements (1.4)
fileset elements specifying files to attach.

-----Original Message-----
From: Inman, Peter []
Sent: Friday, August 27, 2004 1:34 PM
To: ''
Subject: Ant 1.6.2 email with attachmennt

I'm having trouble sending an attachment with an email. I had this problem
with ant1.5.3, so it's not 1.6 related.

I'd be grateful if someone could point me to where I'm going wrong. I get
the mail message, but no attachments.

     <target name="sendMailTest" depends="init">
     <mail mailhost="" subject="Destin8 Build - BuildLog"
encoding="plain" tolist="">
        <from address="Destin8Build"/>
        <message>Build Log File</message>
        <fileset dir=".">
          <include name=""/>



This message (including any attachments) contains 
confidential information intended for a specific 
individual and purpose, and is protected by law. 
If you are not the intended recipient, you should 
delete this message and are hereby notified that 
any disclosure, copying, or distribution of this
message, or the taking of any action based on it, 
is strictly prohibited.

Visit us at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message