Jump to content

Recommended Posts

Posted (edited)

Hello:
I will consider myself an evangelist for AU3, but today I encounter an issue with an old friend _INetSmtpMailCom. My script loops over some data on an SQL DB and supposed to send HTML emails to different users. The first x number of emails are processed with no issue (random failure after first), but randomly it gets stuck and the object errors out "error number: 80020009  Transport failed to connect to server" the same script, pointing to the same data works on my client with no issues (client & smtp on same network). It fails once I move it to the server (AWS).
NOTE: I tested even sending the first message X number of times....

 

smtpsendHV.au3

Edited by neotechit
upload source
Posted

I have tried it but still the same; I have tried sleep(), 10000,20000,30000,40000,60000 and still happens.
I added a second try to send the email if the first fails, this works but it increases the time to 6 emails in 8 minutes.
Still looking for an acceptable solution....

21 hours ago, neotechit said:

 

 

Posted (edited)

Got it!
I had to split the SMTP configuration and the message send into two different function, invoked the config only once before attempting to send a message and later I just call the CDO object after changing the recipient, subject and body. This made it work smooth and fast. - Hope this helps someone else doing an email (HTML) pusher.

23 hours ago, neotechit said:

 

 

Edited by neotechit

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...