Troubleshooting Guide: Email Alerts In Orchestrator

How to troubleshoot Email Alerts issues in Orchestrator?

Overview:

This comprehensive guide outlines the steps to set up email alerts in UiPath Orchestrator successfully. Ensure the environmental setup aligns with the necessary specifications, check the configurations and test the email sending functionality to ensure everything works seamlessly.

Documentation:

Ensure to follow the steps described in the official documentation:

UiPath.Orchestrator.dll.config Settings:

Verify that the Alerts.Email.Enabled key is set to True in the UiPath.Orchestrator.dll.config file.

Also check the Cron Expressions, their default values are:

  • DailyAlertMailJobCron - 0 0 7 1/1 * ? * - At 07:00:00am, every day
  • PeriodicErrorMailJobCron - 0 0/10 * 1/1 * ? * - At second :00, every 10 minutes starting at minute :00

Restart Site and AppPool:

From IIS (Internet Information Services), restart the Site and AppPool.

User Email Verification:

Ensure the Orchestrator logged-in user has an associated valid email address in the Profile page

Email Settings:

In Orchestrator, on the Settings page under the Mail tab, confirm the following:

  • Enable alerts email is checked.
  • Use default credentials is unchecked.
  • Enable SSL is checked.
  • Correct values for SMTP Host, Port, Username, and Password.
  • Default from address contains a valid email address.

Note: For Gmail/ Yahoo, ensure "Allow less secure apps" is enabled.

Note: Ensure SSL option is checked for secure connection. When unchecked it means no encryption is used (similar to SecureConnection = None from Studio → Send SMTP mail message activity)

Event Viewer Logs:

Check the Event Viewer logs on the Orchestrator server for any warnings/errors, for example:

Error: "Sending errors mail failed for user TESTUSER: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [........]
Resolution: These errors are usually caused by incorrect settings (for example if the "Default from address" field does not contain a valid email
address).

Warning: "Sending errors mail failed for users TESTUSER"
Resolution: Incorrect settings in Orchestrator → Settings page → Mail tab

Windows PowerShell Commands:

Run below Windows PowerShell commands on Orchestrator server to check that emails are sent outside Orchestrator

$cred = Get-Credential -UserName "test@com" -Message "Enter password for:"
$EmailFrom = "test@gmail.com" #this does not matter
$EmailTo = "test@com"  #this must be a valid email address
$Subject = "test subject"
$Body = "Test message body"
$SMTPServer = "gmail.com" #this is important; set it correctly and play with it
$smtpPort = 25 #play with the port, maybe it's not 25 (the most common port); for gmail.com, try with 587, 465, 25
# try the following command with and without UseSsl; 
Send-MailMessage -SmtpServer $SMTPServer -Port $smtpPort -From $EmailFrom -To $EmailTo -Subject $Subject -Body $Body -Credential $cred -UseSsl

Test Email Sending:

Use the "Send SMTP mail message" activity from Studio to test email sending. Pay attention to the SecureConnection option.

Upon successful setup, a confirmation email is sent when an account is added in Orchestrator. Make sure to confirm the email address.

image.png

Once the user confirms email address, then IsEmailConfirmed column in dbo.Users table will be updated to 1. The default (initial) value is 0.

Whitelist the email domain:

Make sure that the "@uipath.com" is whitelisted in your SMTP server and also for your firewall.

Additional Note for Cloud Platform Setup:

If Orchestrator is set up on a Cloud Platform, reach out to the Orchestrator support team for assistance with IP whitelisting and other support.

By following this guide, a smooth and effective setup is ensured for receiving email alerts from UiPath Orchestrator, enabling prompt responses to alerts and maintaining optimal workflow operations.