Hi all,

I am trying to send an email with an attachment having Content-Type
"text/comma-separated-values; charset=UTF-8". The attachment is sent,
but it comes out in encoding base64(US-ASCII). I do something like
this:


import javax.mail.Multipart;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMultipart;

// ...
        String htmlBody;        // ...
        String attachmentData;  // ...

        Multipart mp = new MimeMultipart();

        MimeBodyPart htmlPart = new MimeBodyPart();
        htmlPart.setContent(htmlBody, "text/html");
        mp.addBodyPart(htmlPart);

        MimeBodyPart attachment = new MimeBodyPart();
        attachment.setFileName("data.csv");
        attachment.setContent(attachmentData, "text/comma-separated-
values; charset=UTF-8");
        mp.addBodyPart(attachment);

        message.setContent(mp);


But the attachment comes out in us-ascii. I've als tried with setting
headers, but to no avail. I probably need to approach this
differently. So, any pointers greatly appreciated.

Thanks!
Robert

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=.


Reply via email to