Article View: borland.public.cppbuilder.internet.socket
Article #2926Re: Attachments using Indy?
From: Franz J Fortuny
Date: Wed, 21 Dec 2005 21:16
Date: Wed, 21 Dec 2005 21:16
21 lines
1678 bytes
1678 bytes
>
>> What is the straightforward way to attach a zip file or
>> any kind of file to a message being sent with INDY.
>
> There is only one way - instantiate a TIdAttachment object, specifying the
> TIdMessage::MessageParts property as the owner.
this is what I've done and seems to be working perfectly:
if(lbAdjuns->Items->Count > 0)
{
for(int i=0;i<lbAdjuns->Items->Count;i++)
{
TIdAttachment(iMen->MessageParts,lbAdjuns->Items->Strings[i]);
}
}
(lbAdjuns = Attachments list box:
The items inside the ListBox are all names of files.)
Thanks, Gambit.
Technical Details
Message-ID:
<43a9c5de@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43a8bd6c$1@newsgroups.borland.com> <43a8cd1b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,38646c715cb8dd31 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Franz J Fortuny" <fraforNOSPAM@ivsolNOSPAM.com> From: "Franz J Fortuny" <fraforNOSPAM@ivsolNOSPAM.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <43a8bd6c$1@newsgroups.borland.com> <43a8cd1b$1@newsgroups.borland.com> Subject: Re: Attachments using Indy? Date: Wed, 21 Dec 2005 15:16:31 -0600 Lines: 23 Organization: Developer X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 201.137.10.100 Message-ID: <43a9c5de@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1135199710 201.137.10.100 (21 Dec 2005 13:15:10 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail