Click here to Skip to main content
15,074,942 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am sending a notification mail using the javamail and the message text which i need to render has a table. My problem is when the mail is received, i need to show this table structure in the mail.

Is there anyway i can do this.

My message text code goes like this

messageText.append("Dear Approver,");
            messageText.append("The following lounge information changes are waiting for your approval");
            messageText.append("<td>Airline Code</td>");

but it shows the message as
Dear Approver,
The following lounge information changes are waiting for your approval
<table><tr><td>Airline Code</td></tr></table>

Basically i want to render a table with the content i set when the message is sent.
any help will be greatly appreciated.

1 solution

You should make the body as HTML instead of Text(mostly which is default).
Refer following link Sending HTML based email using Java[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900