ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Shoemaker - JavaSoft East <Ryan.Shoema...@Sun.COM>
Subject <mail> attachment mime settings
Date Fri, 01 Apr 2005 21:19:24 GMT

I'm trying to send e-mail from an Ant script.  The message body
is a chunk of html that references a small number of png files
that I'm adding as attachments.  I'd like the message to render
nicely in the mail client, but the problem I'm having is that I
can't control the MIME settings on the attachments.

The code looks like this:

     <mail from="Ryan.Shoemaker@Sun.COM"
           subject="Java WS/XML Stats for ${DSTAMP}"
       <fileset dir="${reportdir}">
         <include name="*.png"/>

Which almost works.  I get a message that looks like the following
stripped down src.  The message body is correctly set to "text/html",
but notice that the content type on the png attachments is wrong.
It should be "Content-type: image/png;..."  Is there some way I
can control the MIME settings on the attachments?



 From - Fri Apr 01 15:48:07 2005
Date: Fri, 01 Apr 2005 15:43:24 -0500
From: Ryan.Shoemaker@Sun.COM
Subject: Java WS/XML Stats for 20050401
To: Ryan.Shoemaker@Sun.COM
MIME-version: 1.0
Content-type: multipart/mixed; boundary="Boundary_(ID_nB9kKqgR9c+9aQGFJ43TyQ)"

Content-type: text/html; charset=ISO646-US
Content-transfer-encoding: QUOTED-PRINTABLE


Content-type: application/octet-stream; name=0.png
Content-transfer-encoding: BASE64
Content-disposition: attachment; filename=0.png


Content-type: application/octet-stream; name=1.png
Content-transfer-encoding: BASE64
Content-disposition: attachment; filename=1.png


Content-type: application/octet-stream; name=2.png
Content-transfer-encoding: BASE64
Content-disposition: attachment; filename=2.png


Content-type: application/octet-stream; name=3.png
Content-transfer-encoding: BASE64
Content-disposition: attachment; filename=3.png


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

View raw message