Page 1 of 1

Parsing of HTML mail

Posted: 15 Apr 2010, 08:33
by RuadRauFlessa
Hi peeps,

Why would a mail client strip id params in tags from a html mail body ??

I am sitting with an app I need to maintain and one part of the thing is where people send mails to it. Now the mails they send is actually stuff they reply to which they got from the app itself. Kind of like a survey. Thing is this app was written in such a way that it uses the id fields to check where the data is for a specific field on the thing. Issue is currently that the mail clients keep removing the values from the html source so when the mails gets back the data can not be parsed by the app.

Re: Parsing of HTML mail

Posted: 15 Apr 2010, 09:43
by xumwun
Emails like this usually have 2 message parts.
One part contains the message in plain text and other has the message with the html codes.
It is possible that you are reading the plain text part.

Re: Parsing of HTML mail

Posted: 15 Apr 2010, 10:02
by RuadRauFlessa
xumwun wrote:Emails like this usually have 2 message parts.
One part contains the message in plain text and other has the message with the html codes.
It is possible that you are reading the plain text part.
Not the case though as the app downoads the data and dumps it into a folder from which it then does the parsing. I opened a bunch of these files to check and they are all html but the id flags the parser looks for is no longer there.

Re: Parsing of HTML mail

Posted: 28 May 2010, 09:43
by DeeVeeDee
I i see this post is a bit old, so i was wondering if you came right?

Have you tried viewing the mail in text before it actually gets sent back to the server
which parses the HTML ?


If you send a mail in HTML and the receivers client is set to text it will change it to text, "I think."
Using POP3 commands with telnet you can download a specific message in the clients mailbox.

So what i did is i enabled pop3 on our exchange and i sent a mail to a mailbox with outlook set to HTML then disabled HTML and changed it to text
then forwarded the message. and it was still in HTML so i dont know if this will affect it.

But see the below maybe you can see what is actually being removed after its sent from the client and before it gets to the server

Re: Parsing of HTML mail

Posted: 28 May 2010, 10:01
by RuadRauFlessa
I managed thanks.