I am trying to design a mail integration to a system but I have to process emails as they come. One of my decisions is based on whether I can be 100% sure that email client always send a plain text version of the message body regardless if the user actually writes it in HTML.
For some context: I want to listen to a mailbox for all incoming mails and when one comes in I want to process it so I can figure out if it relates to a task in the system (For this I am going to use some fuzzy logic with the format of the subject. The email chain is always to be instigated from my system.) and then print out the latest addition to the chain in a screen. I am trying to see how I am going to process the incoming email. If it's text it should be straight forward but if it's email I will have to remove a lot of tags. There is also the matter of figuring out where the latest answer stops. There seems to be a lot of clients that use chevrons (>) and indentation but in the case of HTML for now I noticed a