Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
-
None
Description
Current Situation
- When the mail.smtp.port setting is not configured for a Job Resource used by the MailFragment, the Mail Notification throws the following exception:
java.lang.Exception: error occurred on send: java.lang.NullPointerException at com.sos.commons.mail.SOSMail.sendJavaMail(SOSMail.java:579) at com.sos.commons.mail.SOSMail.send(SOSMail.java:470) at com.sos.joc.monitoring.notification.notifier.NotifierMail.notify(NotifierMail.java:52) ...
Desired Behaviour
- The SOSMail class should not throw any NPE but use java default port and not overwrite a possible original Java Mail error message.
Test Instructions
- CONFIGURATION/Inventory
- configure a mail Job Resource without the mail.smtp.port setting
- configure a JITL com.sos.jitl.jobs.mail.MailJob job
- use the Job Resource
- CONFIGURATION/Notification
- configure a mail notitication for the MailJob with the types SUCCESS, ERROR
- use the same Job Resource without the mail.smtp.port setting
- configure a mail notitication for the MailJob with the types SUCCESS, ERROR
- Deploy and run the MailJob
- check the notification results
Attachments
Issue Links
- relates to
-
JITL-670 com.sos.jitl.jobs.mail.MailJob should not use default SMTP port
- Released