Parsing of HTML mail

Get help on programming - C++, Java, Delphi, etc.
Locked
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Parsing of HTML mail

Post 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.
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
xumwun
Registered User
Posts: 133
Joined: 14 Apr 2006, 02:00
Contact:

Re: Parsing of HTML mail

Post 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.
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Re: Parsing of HTML mail

Post 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.
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
DeeVeeDee
Registered User
Posts: 172
Joined: 09 Apr 2010, 15:18

Re: Parsing of HTML mail

Post 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
_̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Re: Parsing of HTML mail

Post by RuadRauFlessa »

I managed thanks.
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
Locked