I'm having a nightmare writing an email parser because it seems either the clients or the email servers keep adding returns at all the wrong spots. For example an email with a paragraph like this:
quote: text text text text text text text text text text text text text text text text text text text text text text text text text text
Should be on one line, but when parsing, it's put on a bunch of seperate lines, so there's no way for the parser to know when to stop. just wondering is there a reason why this hapends, and is it a return, or is it some other special character that can be removed to put it all back on one line?
Has anyone ever written an email parser before to parse specific things? In this case It's news emails for my tech site, but because every single site sends different emails, it's very hard to try and parse them all, especially when emails are also formatted all differently. I'd have to say 90% of emails have this return nightmare where returns are randomly put in lines. If anyone knows a solution to this let me know, thanks.
quote: text text text text text text text text text text text text text text text text text text text text text text text text text text
Should be on one line, but when parsing, it's put on a bunch of seperate lines, so there's no way for the parser to know when to stop. just wondering is there a reason why this hapends, and is it a return, or is it some other special character that can be removed to put it all back on one line?
Has anyone ever written an email parser before to parse specific things? In this case It's news emails for my tech site, but because every single site sends different emails, it's very hard to try and parse them all, especially when emails are also formatted all differently. I'd have to say 90% of emails have this return nightmare where returns are randomly put in lines. If anyone knows a solution to this let me know, thanks.