How to test SMTP with PowerShell for setting up Maximo email notification

In an enterprise IT environment, it is sometimes difficult to setup Maximo to talk with SMTP service due to networking and security restrictions. To troubleshoot SMTP configuration, in the past, we can use Telnet from CMD tool. However, in newer versions of Windows Server, Telnet is often not installed by default. In such cases, we can use PowerShell to test and confirm the SMTP and firewall setting is working before trying to configure SMTP in Maximo.

The first thing I would do is checking whether firewall has been opened so that the port used by SMTP service (e.g. port 25) is reachable from the Maximo server.

I’ve provided details on how to do this with PowerShell in this post. http://vietmaximo.blogspot.com/2020/12/check-networkfirewall-status-using.html

 

Once it is confirmed SMTP service is reachable, the next step I would do is to ensure we can send email with the provided login details. Thus, from PowerShell running on the Maximo server, I would do the following commands:



 

Note that if SMTP service doesn’t require authentication, we don’t need to run the first command and use the parameter -Credential $cred in the second command.

Replace placeholder values with actual details required by your SMTP service, and for the -To parameter, enter your own email address.

The Send-MailMessage command will send an email using your SMTP service. If it works, you should receive an email.

Once SMTP service is confirmed working, I’ll go ahead putting the details to System Properties in Maximo and that should be it.

To test that Maximo can send email, the simplest way I would do is opening any work order, then use the Select Action > Create > Communication, then entering my own email to the “To” address field. If it works, once clicking on Send, it should show a successful status, and you’ll receive an email within seconds. Otherwise, you might want to look at SystemOut.log file to see if there’s any detailed of the error there.


No comments:

Post a Comment