How do I send an HTML content message through the JavaMail API?

John Zukowski

First create a String object containg the HTML text for the message. Then use setContent() to set the message content to a specific content-type. For example :

String msgText = getHtmlMessageText(...);
msg.setContent(msgText, "text/html");
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.