Re: Indy 10 attachments

Giganews Newsgroups
Subject: Re: Indy 10 attachments
Posted by:  Remy Lebeau (TeamB) (gambit47.no.spam@no.spam.yahoo.com)
Date: Thu, 10 Jun 2004

"Rhys Sage" <abuse@127.0.0.1> wrote in message
news:2D44D63493A0E240abuse@127.0.0.1...

> How do I find the name/type of an attachment? How also do I
> access the attachment? I've hunted and the answers are probably
> staring me in the face. I just can't find them though.

As was the case with your earlier questions regarding TIdText, you simply
cast to TIdAttachment instead of TIdText when needed, ie:

    if (IdMessage1.MessageParts.Items[PartCounter] is TIdAttachment) then
    begin
        Attachment :=
TIdAttachment(IdMessage1.MessageParts.Items[PartCounter]);
        // use Attachment as needed...
    end;

Gambit

Replies

None

In response to

Indy 10 attachments posted by Rhys Sage on Thu, 10 Jun 2004