AegisMark
2009-04-02 11:38:12 UTC
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.
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.