The messageFile attribute is a file that is used in the body of the mail
message, not for attachments.

The correct way to make attachments is to use a nested <fileset>.  Cut and
pasted from the MimeMail docs:

 <mimemail message="See attached files" tolist="you" subject="Attachments"
from="me">
            <fileset dir=".">
                <include name="dist/*.*"/>
            </fileset>
        </mimemail>



----- Original Message -----
From: "Chris Chang" <[EMAIL PROTECTED]>
To: "'Ant Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, December 11, 2001 12:42 PM
Subject: mail jar file


> Sorry for the wrong subject (previous)!
>
> -----Original Message-----
> From: Chris Chang [mailto:[EMAIL PROTECTED]]
> Sent: December 11, 2001 10:42 AM
> To: 'Ant Users List'
> Subject: RE: Help with 'pathconvert', please!
>
>
> Folks,
>
> Any ideas to send out jar file via email?
>
> <!--
> sample
> -->
>
>     <mimemail messageFile="test.jar"
>               messageMimeType="application/zip"
>               tolist="[EMAIL PROTECTED]"
>               mailhost="mailhost01"
>               subject="Attachments ${TODAY}"
>               from="test">
>     </mimemail>
>
> <!--
> error
> -->
> --- Nested Exception ---
> javax.mail.SendFailedException: Sending failed;
>   nested exception is:
>         javax.mail.MessagingException: IOException while sending message;
>   nested exception is:
>         javax.activation.UnsupportedDataTypeException: no object DCH for
> MIME ty
> pe application/zip
>         at javax.mail.Transport.send0(Transport.java:218)
>         at javax.mail.Transport.send(Transport.java:80)
>         at
> org.apache.tools.ant.taskdefs.optional.net.MimeMail.doMail(MimeMail.j
> ava:429)
>         at
> org.apache.tools.ant.taskdefs.optional.net.MimeMail.execute(MimeMail.
> java:304)
>         at org.apache.tools.ant.Task.perform(Task.java:217)
>         at org.apache.tools.ant.Target.execute(Target.java:184)
>         at org.apache.tools.ant.Target.performTasks(Target.java:202)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:560)
>         at org.apache.tools.ant.Main.runBuild(Main.java:454)
>         at org.apache.tools.ant.Main.start(Main.java:153)
>         at org.apache.tools.ant.Main.main(Main.java:176)
>
> Total time: 2 seconds
>
> Best Regards,
>
> Chris
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to