Article View: borland.public.cppbuilder.internet.socket
Article #1654Re: Net Master POP3 Question
From: Remy Lebeau (TeamB)
Date: Mon, 18 Dec 2006 19:19
Date: Mon, 18 Dec 2006 19:19
26 lines
2429 bytes
2429 bytes
"LarryJ" <LarryJ33@austin.rr.com> wrote in message news:458583ea$1@newsgroups.borland.com... > The NMPOP31 has no built in way to turn off the automatic attachment > saving. I am going to have to look for a different component that has a > built in property for turning off the attachment saving. Indy 10 can handle that, with a little extra effort on your part. The simpliest way is to use the TIdMessage.OnCreateAttachment event to have TIdMessage use TIdAttachmentMemory objects for its attachments. The attachment data will be stored in memory instead of file. If you don't want the data to be stored at all, then you can derive new classes from TIdAttachment and TStream. Override the TStream.Write() method to simply discard any data that is written to it. Then override the TIdAttachment.PrepareTempStream() method to return an instance of your new TStream class, and override the FinishTempStream() method to free it. Then have the TIdMessage.OnCreateAttachment event handler return an instance of your new TIdAttachment class. This way, Indy can still parse all of the header information for the attachments, but not care what the actual attachment data is. Gambit
Technical Details
Message-ID:
<4586e961@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news-lond.gip.net!news.gsl.net!gip.net!colt.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45840082$1@newsgroups.borland.com> <4584049e$1@newsgroups.borland.com> <4585626f$1@newsgroups.borland.com> <458569f2$1@newsgroups.borland.com> <458583ea$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,63a808666c71f13a X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <45840082$1@newsgroups.borland.com> <4584049e$1@newsgroups.borland.com> <4585626f$1@newsgroups.borland.com> <458569f2$1@newsgroups.borland.com> <458583ea$1@newsgroups.borland.com> Subject: Re: Net Master POP3 Question Date: Mon, 18 Dec 2006 11:19:06 -0800 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 75.83.34.171 Message-ID: <4586e961@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1166469473 75.83.34.171 (18 Dec 2006 11:17:53 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news-lond.gip.net!news.gsl.net!gip.net!colt.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail