Originally posted by Krishna Kanth:
i have been trying to send html page in mail but the problem is - its sending the mail in text format i.e., it is sending all html code in the mail not exactly the html page.
From the sound of it your problem is not that you're sending the wrong thing, but just the fact that you don't instruct the mail reader software to interpret the contents as HTML. In other words you either don't set a Content-Type header or the Content-Type is set to text/plain.
Try setting the Content-Type header to text/html.
Often, to support older mail clients, both HTML and plain text versions of the mail are sent out in a multi-part Mime message.
See
RFC1521 for more information about all of this. See also the methods and classes javax.mail.internet.MimeMessage.setContentType(), javax.mail.internet.MimeMultipart, javax.mail.internet.MimeBodyPart.setContentType().
- Peter
[This message has been edited by Peter den Haan (edited February 01, 2001).]