Anyone can help? Thanks. send email function is in a for loop.
send 1st email: success, sleep 1 minutes. send 2nd email: failed, sleep 1 minutes. send 3rd email: success, sleep 1 minutes. ...
You are showing the LastErrorText for the Email object (for the call to the AddBcc method).
What you need is to show the MailMan object's LastErrorText for the SendEmail method call.
answered Aug 16 at 14:53
Chilkat:MailManSmtp Login Status : ChilkatLog:
answered Aug 16 at 15:02
When SendEmail is called, the connection to the SMTP server is kept open so that a subsequent call to SendEmail can continue using the same connection (rather than re-connecting, re-authenticating, etc.)
When your app slept for 1 minute, there was a period of inactivity. When you tried to call SendEmail again, the server responded with:
SmtpCmdResp: 421 4.4.2 smtp29.relay.dfw1a.emailsrvr.com Error: timeout exceededApparently, the "timeout exceeded" was the fact that the connection was idle for so long. The solution is to simply disconnect prior to sleeping. Call mailman.CloseSmtpConnection before sleeping. The next call to SendEmail will automaticaly re-establish the connection and all will be fine..
answered Aug 16 at 15:09