Outlook autocleaning my line breaks and screwing up my email format

outlook inserts line breaks
outlook email adding extra line breaks
insert line break in outlook email
extra lines in outlook emails
remove page break outlook email
line breaks in email
newline in outlook email
new line in outlook email java

I'm sending an email using the dotnet framework. Here is the template that I'm using to create the message:

Date of Hire: %HireDate%
Annual Salary: %AnnualIncome%
Reason for Request: %ReasonForRequest%

Name of Voluntary Employee: %FirstName% %LastName%
Total Coverage Applied For:  %EECoverageAmount%
Guaranteed Coverage Portion: %GICoveragePortion%
Amount Subject to Medical Evident: %GIOverage%

When the messages is received in outlook, outlook tells me "Extra line breaks in this message were removed". And the message displays like this:

Date of Hire: 9/28/2001
Annual Salary: $100,000
Reason for Request: New Hire

Name of Voluntary Employee: Ronald Weasley Total Coverage Applied For:  $500,000 Guaranteed Coverage Portion: $300,000.00 Amount Subject to Medical Evident: $200,000

Note how Outlook incorrectly removes needed line breaks after the name, EECoverageAmount, etc...

It's important for the email recepients to get a correctly formatted email, and I have to assume that some of them use outlook 2003. I also can't assume they will know enough to shutoff the autoclean feature to get the message to format properly.

I have viewed these messages in other mail clients and they display correctly

some more information:

  • I am using UTF-8 BodyEncoding (msg.BodyEncoding = System.Text.Encoding.UTF8)
  • The msg.Body is being read from a UTF-8 encoded text file, and each line is terminated with a crlf.

Question: How do I change the format of the message to avoid this problem?

Start every line with 2 spaces and outlook will be "tricked" into keeping your formatting.

So change

Date of Hire: %HireDate%
Annual Salary: %AnnualIncome%
Reason for Request: %ReasonForRequest%

Name of Voluntary Employee: %FirstName% %LastName%
Total Coverage Applied For:  %EECoverageAmount%
Guaranteed Coverage Portion: %GICoveragePortion%
Amount Subject to Medical Evident: %GIOverage%

to

  Date of Hire: %HireDate%
  Annual Salary: %AnnualIncome%
  Reason for Request: %ReasonForRequest%

  Name of Voluntary Employee: %FirstName% %LastName%
  Total Coverage Applied For:  %EECoverageAmount%
  Guaranteed Coverage Portion: %GICoveragePortion%
  Amount Subject to Medical Evident: %GIOverage%
^^ <--- Two extra spaces at the start of every line

Here is the article I found when researching this problem which goes into a little more depth than my answer.

How do I format a String in an email so Outlook will print the line , I like to send my e-mails in plain text unless I really need better formatting (so it is /outlook-autocleaning-my-line-breaks-and-screwing-up-my-email-format Outlook autocleaning my line breaks and screwing up my email format (7) Adding "\t\r " ( \t for TAB) instead of "\r " worked for me on Outlook 2010. I'm sending an email using the dotnet framework.

You can also insert a tab character at the end of the line (just before the CR LF). This extra white space will be at the end of the line and hence not visible to user. You might prefer this to having to insert spaces on the left. Note that a single space is not enough (though perhaps multiple spaces would help, I don't know.)

Thunderbird-side way to stop Outlook removing line breaks , Watch for errors in `.watcher-history-*` and alert via Email. This finds errors like Ref: https://stackoverflow.com/questions/247546/outlook-autocleaning-my-line- breaks-and-screwing-up-my-email-format/436114#436114. ctx['payload']� See also Outlook autocleaning my line breaks and screwing up my email format You need to use \r as a solution. if the message is text/plain using, \r should work; if the message type is text\html, use < p/>

Add watching the Elastic watcher (External Elastic Watcher , The content got printed in next line in Outlook 2010 mail. 查看更多 See also Outlook autocleaning my line breaks and screwing up my email format. 查看更多. mon texte inclut '\r ' Mais Outlook 2010 ne rend pas line break. Créez des tokens de lignes délimitées par '\r ' et des tokens d'enveloppe par des balises de paragraphe HTML. Mon format de courriel est HTML. Je génère un corps HTML pour mon e-mail dans le code ci-dessous.

I have always had better luck formatting e-mails as html. You may still have the end-user issue of having to set the client to allow html format, but they are usually more familiar with this since so many e-mails do come html formatted. You also have a little more work on your end adding the html tags, but the end result is much more controllable.

@ephemient also suggests: Send as both HTML and plaintext. Good clients will show the latter, Outlook will show the former, everybody is happy (except the programmer who has to do more work).

How do I format a String in an email so Outlook wi-第3页回答- 码农岛, When viewing the plain text email signature in Microsoft Outlook, That will tell a receiving copy of Outlook not to mess with the line breaks. .net - Outlook autocleaning my line breaks and screwing up my email format . I'm sending an email using the dotnet framework. Here is the template that I'm using to create the message: Date of Hire: %HireDate% Annual Salary: %AnnualIncome% Reason for Request: %ReasonForRequest…

Adding "\t\r\n" ( \t for TAB) instead of "\r\n" worked for me on Outlook 2010.

Why is Outlook stripping line breaks from plain text emails : The , Im sending an email using _INetSmtpMail and Ive stored my lines in an array / outlook-autocleaning-my-line-breaks-and-screwing-up-my-email-format. I added a @TAB at the end of each entry and that fooled Outlook. 126 Outlook autocleaning my line breaks and screwing up my email format 22 Do any languages mark social distinctions other than gender and status? 7 How to create value over time line chart in Kibana 4?

_INetSmtpMail and line breaks in body, See my latest post here: Using MegaCLI to Monitor Openfiler (rev2). #using two spaces at the beginning of each line for outlook -- see /247546/outlook- autocleaning-my-line-breaks-and-screwing-up-my-email-format. .net - Outlook autocleaning my line breaks and screwing up my email format . I'm sending an email using the dotnet framework. Here is the template that I'm using to create the message: Date of Hire: %HireDate% Annual Salary: %AnnualIncome% Reason for Request: %ReasonForRequest…

Using MegaCLI to Monitor Openfiler, /outlook-autocleaning-my-line-breaks-and-screwing-up-my-email-format. When the messages is received in outlook, outlook tells me "Extra line breaks in this� 119 Outlook autocleaning my line breaks and screwing up my email format; 32 How can I force input to uppercase in an ASP.NET textbox? 22 Does viewstate expire?

Neil Herber's Wiki - Main, However, recently the email format has been messing up. We used HTML formatting in the email previously to format paragraph breaks. 365 How do I get a platform-dependent new line 97 Outlook autocleaning my line breaks and screwing up my screen and start composing an email to a

Comments
  • While both highly upvoted answers below are right, see this answer for a list of all the rules.
  • possible duplicate of How do I format a String in an email so Outlook will print the line breaks?
  • Why does this "feature" even exist?
  • Try Windows newlines: \r\n. It worked for me.
  • Here's a handy Regex to sort this out: Regex.Replace(messageBody, @"^(?!\s\s)", " ", RegexOptions.Multiline);
  • Ok, in that regex there are two spaces but this being html it's only displaying one!
  • For code generated plain text emails this is the best solution.
  • Regex.Replace(messageBody, @"(?<!\t)((?<!\r)(?=\n)|(?=\r\n))", "\t", RegexOptions.Multiline)
  • Perfect solution for emails sent from Trac to Outlook users.
  • +1 I had to use 3 spaces instead of a tab, but basically this fix worked for me: Regex.Replace(messageBody, @"(?<!\t)((?<!\r)(?=\n)|(?=\r\n))", " ", RegexOptions.Multiline)