Noosphere Noosphere - 8 months ago 85
HTML Question

Newlines in Outlook 365 e-mail sent from Play Java

When I try sending the below note using Play framework's e-mail utility as "text/html", the new line is not being preserved

**Original string**
this is a test
this is a test

But what I see in my e-mail is the newline linebreaks being abandoned somewhere either in Outlook or in Java

this is a test this is a test

I've tried all of the suggestion from below by adding br,\n, \r\n, \t\t, etc to my program and still cannot get the new lines to display properly

How do I format a String in an email so Outlook will print the line breaks?

Answer Source

If your data is HTML, line break is the <br> HTML element.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download