Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-4367

Sending notifications causes exception in javamailer if user is missing smtp adress

    XMLWordPrintable

    Details

      Description

      If notification is sent to multiple users exception is generated if any of the users are missing smtp address, and notification is sent to none of the reciptients:

      2011-01-26 01:53:51,509 ERROR [Thread-303637] JavaMailNotificationStrategy: send: Error sending notification.
      org.opennms.javamail.JavaMailerException: Cannot have an empty to address.
      at org.opennms.javamail.JavaMailer.checkEnvelopeAndContents(JavaMailer.java:410)
      at org.opennms.javamail.JavaMailer.buildMessage(JavaMailer.java:286)
      at org.opennms.javamail.JavaMailer.mailSend(JavaMailer.java:256)
      at org.opennms.netmgt.notifd.JavaMailNotificationStrategy.send(JavaMailNotificationStrategy.java:72)
      at org.opennms.netmgt.notifd.ClassExecutor.execute(ClassExecutor.java:71)
      at org.opennms.netmgt.notifd.NotificationTask.run(NotificationTask.java:282)

      It would be better to log specifically about user missing SMTP adress, and leave it out, and only if no usable recipients are found to warn about that.

        Attachments

          Activity

            People

            • Assignee:
              jeffg Jeff Gehlbach
              Reporter:
              alexh@boxed.no Alexander Hoogerhuis
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: