Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java mail

Status
Not open for further replies.

raji96

Programmer
Aug 7, 2001
64
0
0
US
I am trying to put the content of my mail in html format but my tags are also being printed in the mail how should can i get it write.

strMailBody ="<HTML><BODY>" +"First Name:" + strutsForm.getFirstName() +"\n" +

Thanks!
 
When you set the content of the MimeMessage, set the mime content type also, eg :

Code:
Message m = new MimeMessage();
m.setRecipient ...
m.setFrom ...
...
m.setContent("<html><body><i>Hello</i></body></html>", "text/html");
...

Transport.send(m);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top