|Subject:||Re: Receive mail with attachment (indy 9)|
|Posted by:||Remy Lebeau \(TeamB\) (email@example.com)|
|Date:||Thu, 27 Mar 2008|
"duf" <d…@wp.pl> wrote in message news:032B60F8CD4DE340d…@wp.pl...
> I cannot find code for receive mail with attachment.
Have you looked at the demos on Indy's website yet?
> I try do it with something like this:
Why are you clearing the TIdMessage after downloading it but before
accessing its content? You need to stop doing that.
> I do not know how can I get name of attachment ( zal_nazwa )
> and how to save file.
You have not read the documentation yet, have you?
ilosc_wiad = POP3Client->CheckMessages();
for(int i = 1; i <= ilosc_wiad; ++i)
for(int j = 0; j < IdMessage1->MessageParts->Count-1; ++j)
TIdAttachment *Attachment =
if( Attachment )
// use Attachment as needed. It has a FileName
// property and SaveToFile() method available...
Receive mail with attachment (indy 9) posted by duf on Thu, 27 Mar 2008