I'm trying to send an email in Java but when I read the body of the email in Outlook, it's gotten rid of all my linebreaks. I'm putting \n at the ends of the lines but is there something special I need to do other than that? The receivers are always going to be using Outlook.
I found a page on microsoft.com that says there's a 'Remove line breaks' "feature" in Outlook so does this mean there's no solution to get around that other than un-checking that setting?
Thanks
Put the text in
<pre>
Tags and outlook will format and display the text correctly.i defined it in CSS inline in HTML Body like:
CSS:
i defined the font-family to have to font set.
HTML:
The
\n
largely works for us, but Outlook does sometimes take it upon itself to remove the line breaks as you say.Try this:
Regards, Mohammad Rasool Javeed
\r\n will not work until you set body type as text.
You need to use
\r\n
as a solution.This must be helpful for you. try "%0A" instead of "\n". The real source is here.
You need to add "%0A" where ever you need a new line in your code. In your case