Re: TIDMessage DeleteTempFiles

Giganews Newsgroups
Subject: Re: TIDMessage DeleteTempFiles
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Wed, 17 May 2006

"Mark Williams" <mark@{removethis}skwirel.com> wrote in message
news:983936B8CFF8E240mark@{removethis}skwirel.com...
> Using Indy 9.

Which specific build of Indy 9 are you using?

> when loading e-mails via TIDMessage

How exactly are you loading the emails?  Are you using
TIdMessage.LoadFromFile()?  Are you downloading the messages via TIdPOP3 or
TIdIMAP4?

> if the e-mail has embedded images etc they are being saved
> as jpegs to the application path

Please elaborate.  What EXACTLY is happening?  TIdMessage never stores temp
files into the application's folder.  It always stores them into the OS's
own Temp folder.  The only way should be appearing in the application's
folder is if you are calling TIdAttachment.SaveToFile().  But the source
file in the Temp folder should still be getting deleted even in that
scenerio.

> Having looked at the source for IDMessage it doesn't seem to be set
> to do anything!

Yes, it does.  When parsing message data, the TIdMessage.DeleteTempFiles
property is copied to the TIdAttachment.DeleteTempFile property, which is
then used in the TIdAttachment destructor to delete the file when the
TIdAttachment is freed.

Gambit

Replies

In response to

TIDMessage DeleteTempFiles posted by Mark Williams on Wed, 17 May 2006