ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: Ant 1.6.2 email with attachmennt
Date Fri, 27 Aug 2004 14:22:13 GMT
Use encoding="uu" instead of encoding="plain".
The documentation does not explain this issue clearly.
It looks like from a glance at the code that :
encoding="uu" means ====> attach any files
encoding="plain" means ====> include the contents of the files in the 
body of the email
encoding="mime" means ===> use JavaMail; in this cases the files are 
always attached rather than included.
with mime encoding you need mail.jar and activation.jar in the classpath 
when running ant.

Cheers,

Antoine


Inman, Peter wrote:

>I've tried that, but that sends the file in the body of the message, not in
>an attachment.
>
>>>From the command line I get
>
>[mail] Sending email: Destin8 Build - BuildLog
> [mail] Sent email with 1 attachment
>
>But the file appears in the message body.
>
>Pete
>
>-----Original Message-----
>From: Ankita Kapadia [mailto:ankita_kapadia@persistent.co.in] 
>Sent: 27 August 2004 10:02
>To: Ant Users List
>Subject: RE: Ant 1.6.2 email with attachmennt
>
>The "Mail" task can successfully send mails with attachments,
>I guess the path to the file needs to be a complete one
>so I have a varaiable like "prop.buildlocation" in the conf file
>where all my log files will be stored and I delete these at
>the end of the build.
>
><mail failonerror="false" mailhost="smtp.persistent.co.in" subject="BUILD
>FAILED :-( ${TODAY}" user="${mailid}" password="${pass}"
>files="${prop.buildlocation}\clearcase.log,${prop.buildlocation}\build.log"
>tolist="${prop.mailtolist}" >
>
>~Ankita.
>
>-----Original Message-----
>From: Inman, Peter [mailto:peterinman@mcpplc.com]
>Sent: Friday, August 27, 2004 1:34 PM
>To: 'user@ant.apache.org'
>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="128.1.1.101" subject="Destin8 Build - BuildLog"
>encoding="plain" tolist="peterinman@mcpplc.com">
>        <from address="Destin8Build"/>
>        <message>Build Log File</message>
>        <fileset dir=".">
>          <include name="builddestin8.properties"/>
>        </fileset>
>     </mail>
>   </target>
> 
>Pete
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message