0

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

     **Result**
     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?

Vadim Kotov
  • 7,103
  • 8
  • 44
  • 57
Noosphere
  • 317
  • 6
  • 17

1 Answers1

1

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

Dmitry Streblechenko
  • 56,873
  • 3
  • 44
  • 75