ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hawkins <jonathan.hawk...@Cedar.com>
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:
mime
C:\tempFix\build.xml:12: Failed to initialise encoding: mime
	at
org.apache.tools.ant.taskdefs.email.EmailTask.execute(EmailTask.java:465)
	at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at org.apache.tools.ant.Target.execute(Target.java:341)
	at org.apache.tools.ant.Target.performTasks(Target.java:369)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
	at com.cedar.ant.AntServlet.processRequest(AntServlet.java:119)
	at com.cedar.ant.AntServlet.doPost(AntServlet.java:65)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
	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 com.evermind._bf.run(Unknown 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 ${session.id}"/>
    <echo message="${uname}"/>
    <echo message="${uemail}"/>
    <zip destfile="${session.id}/${uname}.zip">
      <fileset dir="${session.id}" includes="*" excludes="**/${uname}.zip"/>
    </zip>
    <mail encoding="mime" mailhost="mailserver" subject="Test build">
      <from address="Jonathan.Hawkins@cedar.com"/>
      <replyto address="Jonathan.Hawkins@cedar.com"/>
      <to address="${uemail}"/>
      <message>The ${session.id} nightly build has completed</message>
      <fileset dir="${session.id}" includes="**/${uname}.zip"/>
    </mail>
    <delete dir="${session.id}" includes="*" excludes="**/${uname}.zip"/>
    <!-- <delete dir="${session.id}"/> -->
  </target>




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 http://www.cedar.com/Home.asp


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


Mime
View raw message