I need to add html to an email so I use Mark Leusink HTMLMail SSJS function. The html I have is in a richtext field and it looks like this.
"Content-Type: text/html; charset="utf-8"
<p dir="ltr">
Test1</p>
<p dir="ltr">
Test12</p>
<p dir="ltr">
Test3</p>
<p dir="ltr">
Test4</p>
<p dir="ltr">
</p>"
The content of the rt field is filled using the standard RT Editor in xpages
I have tried these method to add the rt to the email. "mail" is the html function and "rt" is the richtextitem where the content is stored
mail.addHTML(rt.getFormattedText(false,0,0));
mail.addHTML(rt.getUnformattedText();
But when I recieve the email the html is not preserved and the text is displayed without paragraphs,
How can I add the content of the richtext field to an html mail and preserve the html that is in the rt field
Thanks
Thomas