Anyone know how to send binary attachment which is already in memory as byte array?
0 posts in topic
Flat View  Flat View

Posted By:   Anonymous
Posted On:   Monday, October 7, 2002 08:22 AM

I tried to send a pdf as attachment using JavaMail.

This pdf is already in memory as byte[].

I created a DataHandler object using construct

DataHandler(byte[], "application/pdf"), and passed it to MimeBodyPart.setDataHandler().

When I tried to send the mail, I got:

javax.activation.UnsupportedDataTypeException: no object DCH for MIME type applic/pdf

at javax.activation.ObjectDataContentHanlder.writeTo(DataHandler.java:305)

About | Sitemap | Contact