Skip to main content
Kofax

Troubleshoot SMTP issues using PowerShell

Problem statement:

The Nuance system is sending email messages via SMTP, such as scan to email, reports, logs, notifications, etc., however the message is not reaching the recipient.

Troubleshooting:

One way to isolate the issue is to use an external tool to perform a simple SMTP request. Most modern Microsoft OS's have PowerShell available for use. To test SMTP email with PowerShell, open Start -> Run -> Powershell and use the following command:

Send-MailMessage [-To] <string[]> [-Subject] [[-Body] ] [[-SmtpServer] ] [-Attachments <string[]>] [-Bcc <string[]>] [-BodyAsHtml] [-Cc <string[]>] [-Credential ] [-DeliveryNotificationOption ] [-Encoding ] [-Port ] [-Priority ] [-UseSsl] -From []

For example:

send-mailmessage -to user01@example.com -from user02@example.com -subject "Test mail" -smtpserver smtp.example.com

or using specified credentials and SSL:

send-mailmessage -to user01@example.com -from user02@example.com -subject "Test 2" -credential domain01\user01 -useSSL -smtpserver smtp.example.com

If there are no error messages and the message is successfully, then the SMTP server is working correctly.

However, if there are issues with the SMTP server an error message will be displayed, usually in red, which can be used to determine the next steps to troubleshoot.

See also: