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
  • 8,084
  • 8
  • 48
  • 62
AKSM
  • 327
  • 7
  • 20

1 Answers1

1

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

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78