cleanair4me
Technical User
- May 16, 2008
- 61
For sending email (with HTML tags) what is the best one to use?
I am using this now where it works except where I have <br> in the message it doesnt add the newline to my output. Please advise if there is something else I can use beside setContent?
Example of my what is in my message where everything works in the Outlook email output except the <br> tag.
I am using this now where it works except where I have <br> in the message it doesnt add the newline to my output. Please advise if there is something else I can use beside setContent?
Code:
// Setting the Subject and Content Type
msg.setSubject(subject);
msg.setContent(message, "text/html");
Transport.send(msg);
Example of my what is in my message where everything works in the Outlook email output except the <br> tag.
Code:
String message = "";
message += "Here is my link <a href='myaddresshere.com'>link</a><br>";
message += "<font color='green'>Next line of info here.</font><br>";
message += "<strong>Another line here</strong>";