Preserving original formatting in plaintext emails (ie. we're parsing and would like to throw out auto-inserted line breaks) -


we're receiving , parsing plaintext emails reply-via-email feature. basically, have forum , people can reply forum thread replying notification email.

the problem we're seeing email clients generate plaintext version of email, hard wrap @ 80 characters. i've read, in accordance email specifications. end result forum reply created email has linebreaks @ every 80 characters, making formatting quite strange when displayed on web.

when parse plaintext preserve original formatting. there way reliably? example, auto-inserted terminators "\r\n" instead of "\n"? strip out "\r\n" , leave "\n" , safe, or garble messages bad doing nothing?

you can't rely on email clients insert "\r\n" when wrapping text. difference in line ending characters depends on operating system conventions.

people have press return twice make real paragraph break in email, best remove single line endings, leave multiple line endings. i.e. "\r\n" or "\n" gets stripped, "\r\n\r\n" , "\n\n" left.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -