Gmail cleans up html in email?

I noticed that when you submit an html email from Gmail (not sure about other providers) the html structure changes in the process. The forwarded html loses all ids declared inside the original html, and other "cleanup" also happens on the html.

Can someone explain why this is happening or is it possible to avoid it? Or is it entirely up to the smtp provider?

I have an app that monitors emails on a specific mailbox and tries to parse it, but as I said, when a user emails it to that mailbox (from Gmail), the HTML email structure is cleared and may no longer be my code parse html because a lot of ids are gone.

Due to this, I have to find a new way to parse what I need from email, such as using regular expressions in the plaintext section of the MIME message.

I have searched this question and I could not find any information.

+3


source to share


1 answer


Gmail separates header header and ids and classes on a pre-processor. This means that when you submit or reply to gmail, these elements never existed, so they are not included in the reply.



+2


source







All Articles