How to get real content of a simple email message in TidPOP3 object of Delphi

I read a POP3 message in a TIdMessage component says M (idPOP3.Retrieve(MessageNumber,M))
But the Body has only one line, "This is a multipart message in MIME format.
The message content is (seen with gmail client) just a couple of simple text lines ...
So where are these text lines ?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sinisa VukSoftware architectCommented:
what you get if you iterate through all msg parts?
MsgItem := TIdMessage.Create;
      IdPOP31.Retrieve(1, MsgItem);
      Memo1.Lines.Add('Message id: ' + MsgItem.MsgId);
      Memo1.Lines.Add('Message parts: ' + IntToStr(MsgItem.MessageParts.Count));
      for msgParts := 0 to MsgItem.MessageParts.Count-1 do
        if MsgItem.MessageParts[msgParts] is TIdText then
          Memo1.Lines.AddStrings((MsgItem.MessageParts[msgParts] as TIdText).Body);

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LeTayAuthor Commented:
Will try that tomorrow, thanks
LeTayAuthor Commented:
Excellent, I got the message and a trailer with some tags that I do not need
But the body is Ok
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.