File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes How to send HTML contents through Java Mail API Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "How to send HTML contents through Java Mail API" Watch "How to send HTML contents through Java Mail API" New topic
Author

How to send HTML contents through Java Mail API

Rahul Khanna
Greenhorn

Joined: Apr 04, 2002
Posts: 3
I am facing a problem in sending HTML contents through Java mail API.
In the message String I wrote
msg.setText(<b>Hello </b> ;
.....and later.......
Transport.send(msg)
But when this message is viewed in the InBox of the reciepent the message recieved was
<b>Hello </b>
whereas I wanted to send Hello in BOLD.
rob harvey
Greenhorn

Joined: Apr 05, 2002
Posts: 25
you need to msg.setcontent(yourcontent,text/html)
thatll do it mate
 
 
subject: How to send HTML contents through Java Mail API
 
Threads others viewed
How to send HTML contents through Java Mail API
How to send a Picture in Email
problem with images in web app
Want to include html in my email message...
JAVA mail API : HTML mails are sent with html tags.
developer file tools