0 votes

Hello everybody,

I use mail.dll to verify mail when getting the machine out of sleep.

I does pretty good job, when I open it at each start.

I tried to optimize it, by letting imap opened when sending the machine to sleep. That runs sometimes, but if the sleep happens when some exchange is attempted with the server, of course the connection is lost, and reopening it does not seem that simple.

I came back to opening the imap connection each time the machine comes alive, was that a good idea ?

by (200 points)

1 Answer

0 votes

When your machine goes to sleep sooner or later all TCP connections will be terminated. They are terminated because of resulting errors - one end stops responding.

I would say that re-creating Imap instance and opening connection again in such case is the only possible way.

by (296k points)
...