Re: How load message without attachment body ?

Giganews Newsgroups
Subject: Re: How load message without attachment body ?
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Sat, 13 Aug 2005

"Janex" <Janex…@inbox.lv> wrote in message
news:0ABC58C624D6E240Janex…@inbox.lv...

> How can I load mail message information (subject, body, from, date)
> WITHOUT loading attachment body, but with information about
> attachment - file name, size ???

The short answer is that you cannot.  You must load the entire message in
order to retreive information about the attachments.

The longer answer - retreiving just the headers is relatively simply, you
can use the TIdMessage's LoadFromStream() or LoadFromFile() methods.  They
both have an AHeadersOnly parameter.  As for retreiving attachment
information, the only way to do that without actually loading the
attachments is to parse the message data manually.

Gambit

Replies

In response to

How load message without attachment body ? posted by Janex on Sat, 13 Aug 2005