3 ms·
This was a problem for me when I had to parse incoming emails. The solution I came up with was to ignore the text/plain part and instead strip all HTML from the
by adamlafave 12y ago
This was a problem for me when I had to parse incoming emails. The solution I came up with was to ignore the text/plain part and instead strip all HTML from the text/html part, leaving you with the original text without all of the added newlines.
I wrote about this here: http://adamlafave.com/email-parsing-dont-parse-text-plain/ http://adamlafave.com/email-parsing-dont-parse-text-plain/