Posted By:
Ramachandran_Sridhar
Posted On:
Tuesday, August 21, 2001 11:59 PM
Hi I tried to run the example sendHtml.java given in JavaMail API but getting the above exception..the details are as follows: javax.mail.MessagingException: IOException while sending message; nested exception is: javax.activation.UnsupportedDataTypeException at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:187) at moeza.mail.HtmlImageExample.main(HtmlImageExample.java:71) If i use a DataSource, like the ByteArrayDataSource() given with the API and add multipart to the message (instead of using message.setContent() ) then the problem does not occur. Plain HTML trasfers smoothly. Is there some problem with version of activation?
More>>
Hi
I tried to run the example sendHtml.java given in JavaMail API but getting the above exception..the details are as follows:
javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:187)
at moeza.mail.HtmlImageExample.main(HtmlImageExample.java:71)
If i use a DataSource, like the ByteArrayDataSource() given with the API and add multipart to the message (instead of using message.setContent() ) then the problem does not occur. Plain HTML trasfers smoothly. Is there some problem with version of activation?
2) However, i am not able to send images with the HTML(even after using the ByteArrayDataSource). The received mail displays only blank placeholder and no image seen. Even changing the "cid:" to "Content-ID" in the html "img src" doesnt help.
Any clues?
thanks
sridhar
<<Less