Re: Size of attachment

Giganews Newsgroups
Subject: Re: Size of attachment
Posted by:  Remy Lebeau \(TeamB\) (
Date: Sat, 16 Aug 2008

"duf" <d…> wrote in message news:6FDB0BB4325FE340d…

> It is possible to know how big ( in kb ) is attachment before receiving it
> ?

No.  That information is not available in the email data.

> I would like to receive attachments no larger than 1 MB.

There is no direct way to do that.  If you are using Indy 10, the closest
you can get is to write a custom class that derives from TIdAttachment.
When receiving data, it could save any received data up to 1 MB and then
discard any data after that.  After receiving, if the 1MB limit was reached,
delete any data that was previously saved.




In response to

Size of attachment posted by duf on Wed, 13 Aug 2008