Comments (5)
This is normal HTML behavior, if you want to start on a new line you have to add the <br/>
tag at the end.
line1<br/>
line2<br/>
line3<br/>
You can also use the <pre>
tag, this preserves line feeds and enter at the end.
<pre>
line1
line2
line3
</pre>
from msgkit.
I can't agree. The whitespaces should not be removed from the text. They are characters too.
Please try it with your suggestion:
<pre>
line1
line2
line3
</pre>
and the result will be the same.
And it's wrong. The line breaks should be preserved, but they are removed in MsgKit code, in the method: Strings.GetEscapedRtf(BodyHtml);
Please check the attached .html file. My code is a valid html code, and it can be opened in any browser.
linebreaks.zip
from msgkit.
I should probably add, that we generate html from a docx, and then convert to html using the open xml power tools. If we take that markup and view in a browser, all line breaks are preserved. If we display in an email, some of the line breaks disappear. I've had to put in a couple of regex patterns to replace empty spans with
to get around it.
from msgkit.
Whatever I try I just can't get outlook to show the message with the line breaks (enters). I even fixed the GetEscapedRtf method and that still gives the same problem. So I think it is an limitation in Outlook and for that I'll close this issue and something that I can't fix. When I view the body in the outlook message the HTML is showed correctly but it still Isn't correct in Outlook
from msgkit.
When I make a new message in Outlook and view the body then you'll see that Outlook converts my 3 lines to HTML with paragraph (p) tags in it.
from msgkit.
Related Issues (20)
- Issue with third party previewer - fixed HOT 1
- the email body will display garbled characters if it is too long. HOT 3
- how to send msg file after make it HOT 6
- old Version of System.Runtime.Compilerservices.Unsafe.dll HOT 3
- Categories are never shown after load
- Creating a MSG - how to use AddProperty-method? HOT 17
- Resolve "Duplicate 'PackageReference' items found." HOT 3
- Adding categories to msg file HOT 1
- Compatibility with .NET 5.0 or higher HOT 2
- ConvertMsgToEml plans? HOT 1
- Attached excel file from stream is corrupted HOT 1
- Add a [MsgKit] on Stack Overflow HOT 2
- Basic support of tasks HOT 5
- MsgKit currently still depends on .NETStandard, Version=v2.0, MsgReader on .NETFramework, Version=v4.6.2 HOT 12
- Can you make a MsgKitLite based on MimeKitLite? HOT 3
- Can't send draft email via Outlook New HOT 2
- "Invalid length of the property stream. Parsing .msg file" HOT 3
- Property PidLidReminderSet has wrong type HOT 1
- Email -> Draft message functionality is not working fine. HOT 1
- Possibility to save file in Sharepoint online - Improvement HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msgkit.