The Mail Service in a Niagara R2 UNC station is configured correctly however the MailRecipients are not receiving emails.

Issue

The Mail Service in a Niagara R2 UNC station is configured correctly however the MailRecipients are not receiving emails.

The following errors appear in a Niagara R2 UNC Standard Output Window:
ERROR: Cannot send mail [/Acme/services/MailService]
javax.mail.SendFailedException: Sending failed;
  nested exception is:
    javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
    javax.mail.SendFailedException: 550 5.7.1 Unable to relay
    at javax.mail.Transport.send0 (bytecode 611)
    at javax.mail.Transport.send (bytecode 9)
    at tridium.services.MailService.sendImpl (bytecode 29)
    at tridium.services.MailService.checkOutbox (bytecode 101)
    at tridium.services.MailService.run (bytecode 78)
    at java.lang.Thread.run (line 5)

Turning on the MailService debug feature reveals the follow errors:
DEBUG SMTP SENT: RCPT TO:
DEBUG SMTP RCVD: 550 5.7.1 Unable to relay
.
.
Invalid Addresses
johndoe@anyconmpany.net
DEBUG SMTPTransport: Sending failed because of invalid destination addresses
DEBUG SMTP SENT: RSET
DEBUG SMTP RCVD: 250 2.0.0 Resetting
DEBUG SMTP SENT: QUIT
 

Product Line

TAC I/A Series

Environment

Niagara R2,  UNC-510, UNC-410, UNC-520, Enterprise Server

Cause

The SMTP server is not setup to forward email. In the above error message, joedoe@anyconpany.net does not have an email account on the server, so the email is not relayed.

Resolution

The important thing to note in both error messages is the “Unable to relay” verbiage. This indicates that the SMTP server received the email from R2. However, it can not relay it to an email address if the email account is not on the server itself.

The SMTP server must be setup to relay email messages outside of its own SMTP accounts. Contact the sites IT department for assistance with this.

Note:
If an EmailRecipient is configured with multiple email addresses and if any one of the email addresses can not be relayed by the STMP server, then none of the emails will be sent. Not even an email with a valid address on the SMTP server itself.