neotechit Posted March 6, 2019 Posted March 6, 2019 (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 March 7, 2019 by neotechit upload source
Nine Posted March 6, 2019 Posted March 6, 2019 post your code “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Developers Jos Posted March 7, 2019 Developers Posted March 7, 2019 Have you tried putting a short sleep() between emails? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
neotechit Posted March 7, 2019 Author Posted March 7, 2019 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:
neotechit Posted March 7, 2019 Author Posted March 7, 2019 (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 March 7, 2019 by neotechit
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now