ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hawkins <>
Subject Email Task not sending attachment
Date Tue, 29 Mar 2005 13:36:26 GMT
I am trying to send an email with an attachment using the Any Mail task.

If I use encoding=uu, it send the email but the attachment is included in
the body of the email.

If I use encoding=mime, I get :-

Exception caught: C:\tempFix\build.xml:12: Failed to initialise encoding:
C:\tempFix\build.xml:12: Failed to initialise encoding: mime
	at com.cedar.ant.AntServlet.processRequest(
	at com.cedar.ant.AntServlet.doPost(
	at javax.servlet.http.HttpServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at com.evermind._ctb._psd(Unknown Source)
	at com.evermind._ctb._bqc(Unknown Source)
	at com.evermind._ax._luc(Unknown Source)
	at com.evermind._ax._ucb(Unknown Source)
	at Source)

I have activation.jar and mail.jar in my lib directory and within the lib
directory of Orion2.0.5. I have a servlet which uses ant.jat and a build.xml
to invoke these tasks, so the required libraries for the ant task are within
the same server environment.

I've looked through the user list, with no success, any information would be
greatly appreciated.

Here is the build.xml section

<target name="main">
    <echo message="Ant started for id ${}"/>
    <echo message="${uname}"/>
    <echo message="${uemail}"/>
    <zip destfile="${}/${uname}.zip">
      <fileset dir="${}" includes="*" excludes="**/${uname}.zip"/>
    <mail encoding="mime" mailhost="mailserver" subject="Test build">
      <from address=""/>
      <replyto address=""/>
      <to address="${uemail}"/>
      <message>The ${} nightly build has completed</message>
      <fileset dir="${}" includes="**/${uname}.zip"/>
    <delete dir="${}" includes="*" excludes="**/${uname}.zip"/>
    <!-- <delete dir="${}"/> -->

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to 
whom they are addressed. Any unauthorised distribution or 
copying is strictly prohibited. Whilst Cedar Software Ltd 
takes steps to prevent the transmission of viruses via e-mail, 
we cannot guarantee that any email or attachment is free from 
computer viruses and you are strongly advised to undertake your 
own anti-virus precautions. Cedar Software Ltd grants no 
warranties regarding performance, use or quality of any e-mail 
or attachment and undertakes no liability for loss or damage, 
howsoever caused.  

For more information on Cedar Software and our products, 
please visit our web site at

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

View raw message