|Subject:||Re: Get message text only|
|Posted by:||Remy Lebeau (TeamB) (email@example.com)|
|Date:||Tue, 22 Nov 2005|
"Peter S." <pet…@hotmail.com> wrote in message
> I am very new on indy and I would like some help on how
> to retrieve the text part of a message (content type = text/plain).
> I noticed that
> PartType = mptText
> returns true for both text/plain and text/html content type.
You need to look at the value of the ContentType, not the PartType. For
for I := 0 to IdMessage1.MessageParts.Count-1 do
if IdMessage1.MessageParts[I] is TIdText then
TextPart := IdMessage1.MessageParts[I] as TIdText;
if TextPart.ContentType = 'text/plain' then
// use TextPart as needed...
Get message text only posted by Peter S. on Tue, 22 Nov 2005