State = Retrying and OLE automation errors (wodSmtpServer / wodPop3Server / wodImapServer)
Hello,
when wodSmtp is used for direct delivery (no SMTP - empty .Hostname property), and it encounters an error during communication, it ends with a permanent 14 (Retrying) .State even if .RetryCount property was set to 0. This, at least, happens when used in unblocking (.Blocking = false) mode.
This seems to be a bug (if .State is 14 you should expect that wodSmtp is going to do something next, but it is not and it never returns to 0); it seems to happen randomly but is easily replicable if you try a large direct mailing.
My app uses an array of wodSmtp controls in unblocking mode in order to have multiple simultaneous sending operations (.RetryCount = 0; .RetryWait = 0 for all controls); it periodically checks .State property and, when the state is Retrying (which should never be), issues a .Disconnect method.
This works most of the time, but on some machines a very serious automation error is sometimes generated: -2147417848 Ole automation error: The object invoked has disconnected from its clients . This seems to happen randomly, but in all cases when issuing a .Disconnect method when .State value is 14 (Retrying).
Do you have any suggestions on how to avoid this error or at least to regain access to the control after this error? It is very important because on some machines my app becomes very unstable.