Re: Parsing Message data

Giganews Newsgroups
Subject: Re: Parsing Message data
Posted by:  Remy Lebeau (TeamB) (gambit…@yahoo.com)
Date: Mon, 22 Sep 2003

"Derrick" <derri…@grifflink.com> wrote in message
news:3CB862A1D77FE240derri…@grifflink.com...

> After this, I would like to know how to determine the type
> of message (i.e. text, HTML, etc)

You would have to check if the has any MessageParts entries, and if so then
loop through them one at a time looking for any ContentType properties set
to "text/html".  If there are no MessageParts entries, then look at the
TIdMessage's own ContentType property.

> and then determine how to read those messages inside a
> Delphi component (i.e. TBrowser, Tmemo, etc).

In the case of MessageParts, you would have to locate the TIdMessagePart
that cooresponds to the data you're interested in, then cast it to a TIdText
and use its Body property.  In the case of no MessageParts, TIdMessage has
its own Body property.

Gambit

Replies

None

In response to

Parsing Message data posted by Derrick on Mon, 22 Sep 2003