Discussion:
Win32 Delphi Service Application TidPOP3 Socket Error
(too old to reply)
AegisMark
2009-04-02 11:38:12 UTC
Permalink
I have written a simple threaded application using TidPOP3 Indy Class

To connect to a POP3 server I use the following code
function TPop3.CollectMail: boolean;
begin
result := false;

try
self.Connect;
except
ShowMessage('Failed to Connect');
result := true;
end;

if Connected then
ShowMessage('Connected');
self.Disconnect;
end;

after setting up host, username and password.

It works fine. However when I use the same routines in a service
application I get a 'Socket Error' exception when trying to connect.

I cannot find any help on the subject of Service Apps using indy
classes.

My setup is
Windows XP Professional
Delphi Rad Studio 2007
Indy Core 10

Any pointers would be appreciated.
AegisMark
2009-04-05 09:22:08 UTC
Permalink
Problem Solved!

I had inadvertently added the line:

Connecttimeout = 10;

In the TidPop3 property when I build the "Service Application" version
of my code to resolve another issue.

I thought the value represented Seconds however, it represents
millSeconds!

The connect funcion now works without error.

Mark

Loading...