posted 21 years ago
I am sending a mail through javamail.I can send mail with html message.But when i try to attach image with multipart i get following exception
javax.mail.SendFailedException: Sending failed;
[Mon Jul 14 14:25:21 BST 2003] stderr: nested exception is:
[Mon Jul 14 14:25:21 BST 2003] stderr: javax.mail.MessagingException: IOException while sending message;
[Mon Jul 14 14:25:21 BST 2003] stderr: nested exception is:
[Mon Jul 14 14:25:21 BST 2003] stderr: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type image/png
I can send html message then why can't i attach image with the message.Image i am trying to attach is not on server but on outpout stream.I am doing following for the same.
imageBodyPart.setDataHandler(new DataHandler(out,"image/png"));
i have been going through lot of posting..so guys
i have made sure following is true
mail.jar and activation.jar are on classpath
And yes i did read the JavaMail API on sun's website.
Thanks
Medha