Re: POP3 Attachment problems again

Giganews Newsgroups
Subject: Re: POP3 Attachment problems again
Posted by:  Ciaran Costelloe (ccostell…
Date: Thu, 8 Dec 2005

E.-J. Parsch wrote:
>  showmessage(IntToStr(Msg.MessageParts.count));    // = 1

Indy 9 cannot automatically parse emails that consist only of an
attachment, and this cannot be easily fixed.  Indy 10 was restructured
to deal with this.

>  if Msg.ContentTransferEncoding = 'base64' then begin

If you are _only_ processing emails from this user, strip off the
headers from the raw email (they end at the first blank line) and
decode the base64 text.  Look up TIdIMAP4's code for decoding message
parts, it has to decode individual parts in this manner.

If you are worried about the general case, switch to Indy 10 (it deals
with many other issues that are more common now with emails).  Just
trapping the base64 in the message header won't sort out all your




In response to

POP3 Attachment problems again posted by E.-J. Parsch on Tue, 6 Dec 2005