Hello everyone,
I'm working on adding some e-mailing capability to an existing reporting application.
I am able to generate a report and send it using JavaMail, however I can't seem to get the MIME types right. Know know the 5 MIME types I needs for the 5 formats I support, but they all are sent as .dat files. Upon arrival, if I convert the .dat file to the proper extensions(On Windows) then I can open the file just fine.
I tries using the MIMEBodyPart class's setContent method, but it keeps telling me:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/pdf
It says the same for all my other MIME Types, expect with the correct MIME type listed.
Here is the code:
Please note that getMIMEHeader returns a new javax.mail.Header object that has the value set to the MIMtype
String.
Also, recipients is an ArrayList of type String that contains a listing of everyone the e-mail should be send to.
Thanks,
Jon
[ December 09, 2008: Message edited by: Jon Parise ]