CL,
I think the problem is a network problem (the SMTP server chap started talking about reverse pings ..),
on odd occasions the smtpclient isn't created properly, and this is what I was trying to handle.
Looking back at your first reply you seem to have separate threads for IO probably for this reason.
I would appreciate being able to see a code example from your website, if it's not too complicated
and if you could direct me to a suitable piece of code I'd be grateful.
I was wondering if the application could have 3 goes at creating the smtpclient, and putting a time limit
of say 2 seconds on each attempt to create the client.
In pseudo-code I was thinking of something like :
clientcreated=false;
loop (3 times while clientcreated=false)
create thread
loop (for 2 seconds while clientcreated=false)
end loop
if (clientcreated=false)
cancel thread
end loop
if (clientcreated=false)
error
thread
{
create smtpclient
clientcreated=true
}
Remembering that the rest of the application is synchronised, this shouldn't hold up other users
except when there is this intermittent problem, and then only for 6 seconds.
But again it may not make sense to have a thread in a synchronised application.