Hello,
I made a report distribution tool by using excel. The code was generating some reports and sent them by outlook, but I've decided to switch to CDO even if the code was really reliable. CDO gives me the opportunity to use the tool on a virtual machine where the antivirus is not recognized by the system, and outlook would prompt each time the request to give permission to other applications to send emails.
CDO is working well most of the times, but on long distributions at some point I receive errors like: Transport has lost the connection to the server, or Transport is unable to connect to the server. I don't understand why this is happening. I'm creating the object at each iteration of the loop, so the configuration should be refreshed each time, no?
How to avoid this kind of errors?
Code to follow...
Bookmarks