Send SMTP Mail Message: An existing connection was forcibly closed by the remote host

Hi,

I am using the SMTP Mail Message activity for sending emails from Outlook. The activity is inside the For each row activity that picks up mail-ids from the data table and sends the mail. The UiPath workflow works fine till 5 emails are sent using the activity. But after the 5th mail I get the following error message:

This is a strange issue because the first 5 mails are sent without an error but after that the robot gives this error. Any help would be appreciated.

Thanks

Hi @Ajinkya_Bhide

Does this happen all the time? Can you please send me the log file?
We will investigate this for the next release of Mail activities.

Yes, this happens all the time and I have to execute the mail sending process in a batch of 5. Attaching the log files here for your reference.
Logs.zip (3.7 KB)

1 Like

Hi @Ajinkya_Bhide
Sending too many emails in a quick successions may result in such errors (it depends on the client throttling limits, server throttling limits, etc.).
What you can do is to add a delay of 1-2 seconds after each Send SMTP Mail Message. Please try and let me know how it went.

Hi @ovidiuponoran

Thanks for the help. Adding the delay after the Send SMTP Mail Message worked but 1 or 2 seconds delay did not help, I had to add a delay of 10 seconds and now the mails are being sent without any error.

1 Like