>From other threads in this and other groups / sites, it seems that 
attachment.setContent() does not work properly. What might work is using a 
DataHandler:

        MimeBodyPart attachment = new MimeBodyPart();
        attachment.setFileName("whatever");
        //attachment.setDisposition(Part.ATTACHMENT); // Is this needed, 
and does it work?
        DataSource dataSource = new ByteArrayDataSource(bytesFromSomewhere, 
"application/pdf");
        attachment.setDataHandler(new DataHandler(dataSource));
        mp.addBodyPart(attachment);

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/pctRL8TJRL8J.
To post to this group, send email to google-appengine-java@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=en.

Reply via email to