In Orchestrator, when trying to test mail settings, the following error is displayed:
Sending the test mail failed! SmtpStatusCode: GeneralFailure. Original message from SMTP server: Failure sending mail. (#2600)
The event viewer shows the following error:
UiPath.Orchestrator.Core.Exceptions.BadRequestException: Error code - 2600, Message - ‘Sending the test mail failed! SmtpStatusCode: GeneralFailure. Original message from SMTP server: Failure sending mail.’ —> System.Net.Mail.SmtpException: Failure sending mail. —> System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it XXXXXX
Issue Overview:
In Orchestrator, when trying to test mail settings, the following error is displayed:
Sending the test mail failed! SmtpStatusCode: GeneralFailure. Original message from SMTP server: Failure sending mail. (#2600)
The event viewer shows the following error:
UiPath.Orchestrator.Core.Exceptions.BadRequestException: Error code - 2600, Message - 'Sending the test mail failed! SmtpStatusCode: GeneralFailure. Original message from SMTP server: Failure sending mail.' ---> System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it XXXXXX
Root Cause:
The 2600 error is a generic error that occurs whenever an SMTP message fails. In this case, the actual error is seen in the event viewer and it shows that the problem is that the remote server is refusing the connection.
Resolution:
- To confirm this is the issue that is being faced, make sure to first check the event viewer logs on the Orchestrator server.
- Verify that the correct Port and Hostname is being used under the Orchestrator settings.
- Verify that the SMTP host resolves to the correct IP address
nslookup and hit enterset type=MX and hit enter
- Try sending a test email using powershell
i. i.e. Send-MailMessage -From 'User01 <user01@fabrikam.com>' -To 'User02 <user02@fabrikam.com>', 'User03 <user03@fabrikam.com>' -Subject Test Email' -Body "SMTP Test" -SmtpServer 'smtp.fabrikam.com' -Port '587' -UseSsl 'True'
- If sending an email from PowerShell works on the Orchestrator server, check that the same parameters are used in the Orchestrator GUI. If this is the case, open a ticket with the UiPath support team.
- If the PowerShell command fails, contact your administrator as something is misconfigured in the network or the SMTP server.
