POP3.Retrieve method - Error deleting Attachments

Giganews Newsgroups
Subject: POP3.Retrieve method - Error deleting Attachments
Posted by:  Keith (kroge…@sark.com)
Date: Mon, 23 Oct 2006

I'm developing a project using Indy Sockets, and when I deploy the project to the dev server, I get the following exception thrown. This only occurs when I am retrieving emails with attachments. Is there a way that I can specify this temp folder? Or perhaps check to see if a message has an attachment before retrieving it? Thanks for any feedback.


Type : System.IO.IOException, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The process cannot access the file 'C:\WINDOWS\TEMP\Indy13ebf4df.tmp' because it is being used by another process.
Source : mscorlib
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void WinIOError(Int32, System.String)
Stack Trace :    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.File.Delete(String path)
  at Indy.Sockets.AttachmentFile.Destroy()
  at Borland.Delphi.TObjectHelper.Free(Object Self)
  at Indy.Sockets.MessageClient.@5IdMessageClien$ReceiveBody$ProcessAttachment($Unnamed7& $frame_MessageClient.ReceiveBody, MessageDecoder ADecoder)
  at Indy.Sockets.MessageClient.ReceiveBody(Message AMsg, String ADelim)
  at Indy.Sockets.POP3.Retrieve(Int32 MsgNum, Message AMsg)