Can someone tell me how to send a "HTML formatted" email using com.sun.mail.smtp.SMTPMessage?
There is a setText() method in SMTPMessage class which defaults to the content-type of "plain/text". I want to know whether we can send out emails in HTML format using SMTPMessage class. If so how? Is there a way to set the content-type to HTML?
I need this info very urgently. I would appreciate if anyone can send a quick response to me.
Thanks for the reply n_i, you are right, but which class in the javax.mail API provides this method. I could not find any class either in javax.mail or javax.mail.internet that has a facility to set the content.
The setText() method which is used to set the text of the message defaults to plain/text.