Maximo Open Forum

 View Only

 Email not received via automation script

  • Administration
  • Analytics
  • Architecture
  • Assets
  • Civil Infrastructure
  • Customizations
  • End User
  • Everything Maximo
  • HSE/Oil and Gas
  • Infrastructure
  • Integrations
  • Inventory
  • IoT
  • Life Science/Calibration
  • Linear
  • Maximo Application Suite
  • Maximo For Aviation
  • Maximo User Groups
  • Mobility
  • Nuclear
  • Procurement
  • Reporting
  • Scheduling
  • Security
  • Service Provider
  • Spatial
  • Transportation
  • Utilities
  • Work Centers
  • Work Management
Deepa P's profile image
Deepa P posted 05-02-2023 10:13

We are having an automation script that will launch on MATUSETRANS table whenever materials get added to the actuals of a workorder and send mails to planners.
From few months , no mails are getting triggered, although there are some 77 wos that fulfill the criteria. Nothing has been changed in the script ,can someone suggest what all things to check and what can be the cause of it?

Phil Runion's profile image
Phil Runion

Deepa, there are a few things I would check. 

- Confirm that other emails are being sent out of the system

- Check your code to ensure that it is using the same SMTP server that the rest of Maixmo is using. I like to use send email code that looks like this:

      MXServer.getMXServer().sendEMail("send to email address", "send from email address", "Subject", "Message")

- Check to see if your automation script is actually firing. You could do this by setting the script to a DEBUG logging level.

- Next I would check to ensure that the planners have email addresses or you are handling null email addresses. I have seen issues with escalations that try to send to people without email addresses. 

I hope this helps, Phil 

mark robbins's profile image
mark robbins

Hi Deepa,

It is important to check the SystemOut/SystemErr logs for the time that the script is being triggered.

Your process takes several steps:
1 Script fires when materials get added
2 Script calls Java code to send email & Java code communicates with the mail server to send the email
3 Mail server communicates with other email servers so the email is actually sent

You can need to investigate each stage in turn.

1 Script fires when materials get added
As Phil says you can put the script logger to DEBUG. This is the autoscript logger in the Logging application.
You could add additional DEBUG log entries into your script to write a log message when the script is executed.
You will need to ensure that Script's logger level is set to DEBUG

2 Script calls Java code to send email & Java code communicates with the mail server to send the email
This can be checked by configuring Maximo so it logs details of its interactions with the mail server. Set the mail.debug system property to true
This will generate additional log entries when the Java code opens a connection with the mail server and then tries to send the message

The error messages here will be important - if the mail server has changed in some way (e.g. its IP address) then that should show in the logs as a connection failure.

3 Mail server communicates with other email servers so the email is actually sent
Check the inbox folder for other emails generated by Maximo e.g. emails generated from the PMWoGen crontask
If emails are being received from other parts of Maximo then it is likely to be a data issue e.g. missing / invalid email address as Phil suggests

Once you have gone through each step then you should have a better idea about where the problem is.

best regards,
Mark