• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to send HTML contents through Java Mail API

 
Rahul Khanna
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to msg.setcontent(yourcontent,text/html)
thatll do it mate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!