-2

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

closed as too broad by gnat, Andres F., Philip Kendall, BobDalgleish, Robert Harvey May 7 at 14:03

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    A little more definition of what it is you're trying to accomplish might garner some responses. – Phil N DeBlanc May 7 at 12:55
  • please don't cross-post: stackoverflow.com/questions/56023049/… "Cross-posting is frowned upon as it leads to fragmented answers splattered all over the network..." – gnat May 7 at 12:55
  • whether I can be 100% sure I don't think you can be 100% sure about anything when it comes to email. – Dan Wilson May 7 at 12:59
2

With the large variety of mail clients that exists, you can never be 100% sure of anything being consistent across them all, and even less if the behavior is not mandated by a standard (and the inclusion of a plain-text version isn't).

You will have to test your assumptions if they hold for all the mail clients that are of interest to you, or you need to write your system such that it doesn't make such assumptions.

Not the answer you're looking for? Browse other questions tagged or ask your own question.