Reputation: 408
We need to send emails that are PLAIN TEXT but allow line breaks.
We are using Send Grid and the emails can go out to about anyone (Gmail/Yahoo/company specific/companies that use Outlook)
I've tried EVERYTHING!
I've tried StringBuilder.
Regular String.
Nothing works.
I've tried:
"/n/r"
stringBuilder.AppendLine();
var str = "Line1" + Envrionment.NewLine + "Line 2"
I've tried indenting 3 spaces.
I've unchecked "Remove extra line breaks in plain text messages" in outlook and that doesn't work
To have line breaks in our emails so the end user can read the email easier.
I personally think it is in SendGrid, but all items I've found ask that you make sure you do not have Click Tracking Enabled AND that you set do not convert emails to HTML.
Upvotes: 0
Views: 3795
Reputation: 408
We found a setting "underneath the hood" in our custom code that had it set to HTML when it should had been TEXT. We believe this was confusing Send Grid and causing it to remove the line breaks each time. It is working now.
Upvotes: 1
Reputation: 2273
Have you tried \r\n
? That's the appropriate "linebreak" character in email.
Upvotes: 0