dcsimg
Sending HTML and HTML with images
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

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

Re: Sending HTML and HTML with images

Posted By:   John_Zukowski  
Posted On:   Wednesday, August 22, 2001 08:29 PM

I haven't a clue about your specific problems. There is a FAQ already about sending HTML messages with images included.
About | Sitemap | Contact