Re: Completely lost with TIdText

Giganews Newsgroups
Subject: Re: Completely lost with TIdText
Posted by:  Remy Lebeau \(TeamB\) (
Date: Wed, 17 Sep 2008

"Ed" <ebraze…> wrote in message

> I have a email system that receives text emails and after 2 months
> I have relized that the idmsg.Body doesn't always work.

Yes, it does.  But its use depends on the actual contents of the email.
Certain things are stored in the Body, and other things are stored in the
MessageParts instead.

> 1.  If the header states 7Bit then the text from the email can be
> gotten using idmsg.body  (This works fine).

That is not a guarantee.

> 2.  The other email that I'm getting states 'quoted-printable' and I
> figured out that idmsg.body doesn't work

Again, that depends on the actual message contents.  Does the message's
top-level 'Content-Type' header start with 'multipart/'?

> so I've tried using MessageParts with the following code:
> msgbody does get assigned but it is always blank.

You are only keeping the contents of the last TIdText that was found.  There
may be multiple TIdText objects present.

Remy Lebeau (TeamB)


In response to

Completely lost with TIdText posted by Ed on Tue, 16 Sep 2008