Error retrieving email

Giganews Newsgroups
Subject: Error retrieving email
Posted by:  mikeB (borrowdal…@mdnationwide.co.uk)
Date: Wed, 18 Jan 2006

Hi,

I have a Windows service (written in D7, Indy 9) that periodically checks a
specific mailbox. Each email is retrieved and if one with a specific subject
line is present then the expected attachment is saved and processed and the
email deleted. This has been in operation for over a year with only minor
tweaks. Over the last few days it has been throwing exceptions while trying
to retrieve the email. The exception thrown is an EFCreateError with a
message of
Cannot create file "C:\WINDOWS\system32\attachment;
filename="2006118122954_779697980.csv"". The filename, directory name, or
volume label syntax is incorrect.
or sometimes  Cannot create file
"C:\WINDOWS\system32\application\octet-stream;
name="2006118122954_779697980.csv"". The system cannot find the path
specified.

My code looks like:

    ...
    iCount := POP3.CheckMessages;
    I := 1;
    While I <= iCount Do
      Begin
        msg := TidMessage.Create(Nil);
        POP3.Retrieve(I, msg);
        ...
The exception occurs on the POP3.Retrieve call.

Obviously something in the environment has changed recently because the
problem has only just started with no changes in my program. Can anyone shed
any light on what the problem might be and how I might fix it?

Thanks

Mike

Replies