[SOLVED] Dynamic "From Address" in a Notification Block inside an Alarm Notification Pipeline

I have an alarm notification pipeline setup with a notification block. I can pass in a custom message using associated data on the alarm(s). However, when I tried to pass in a custom "From Address" I get an error message in the gateway logs. I think this is because the Notification block does not allow custom addresses but wanted to verify.

The manual doesn't mention any limitations or capabilities.

https://docs.inductiveautomation.com/display/DOC81/Notification+Block

https://docs.inductiveautomation.com/display/DOC81/Pipeline+-+Filter+on+Alarm+Associated+Data

Could you post the error message you got when trying to use a dynamic From Address?

[emailProfile=custom_SMTP] Error sending message to user 'usr-prov:null:/usr:Mike'. Remaining tries=0
com.sun.mail.smtp.SMTPSendFailedException: 501 5.1.7 Invalid address
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2358)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1823)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1300)
at javax.mail.Transport.send0(Transport.java:255)
at javax.mail.Transport.send(Transport.java:124)
at com.inductiveautomation.ignition.alarming.notification.email.EmailNotificationProfile$EmailTask.sendMessage(EmailNotificationProfile.java:819)
at com.inductiveautomation.ignition.alarming.notification.email.EmailNotificationProfile$EmailTask.buildAndMaybeSendMessage(EmailNotificationProfile.java:807)
at com.inductiveautomation.ignition.alarming.notification.email.EmailNotificationProfile$EmailTask.run(EmailNotificationProfile.java:721)
at com.inductiveautomation.ignition.alarming.notification.email.EmailNotificationProfile.lambda$sendNotification$0(EmailNotificationProfile.java:535)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.sun.mail.smtp.SMTPSenderFailedException: 501 5.1.7 Invalid address
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1832)
... 10 common frames omitted

So when i type in mike@customer.com in the associated data under a variable FromAddress and put {FromAddress} in the actual pipeline I get this error; however, if I type mike@customer.com directly in the notification block it works fine.

It's not dynamic. Most mail servers won't let you specify an arbitrary from address, it's usually tied to the credentials.

1 Like

It took me a minute to notice but there's no binding symbol/button on the entry field, which means it doesn't accept expression inputs. It was giving you the error because it was literally interpreting the {FromAddress} as an email address instead.

1 Like

What credentials is it tied to? We had no issue with using the IT team leaders email for testing purposes so it is possible they have unlimited access.

The auth credentials of whatever email profile is being used by the block.

I see. Thank you.

That is what I originally thought. The customer didn't have a catch all account setup though so we have to go back and change a lot of notification blocks when they eventually get it setup. Currently using the IT team leader's email address.

In our facility, I've been able to get away with a made-up email like "ignition-noreply@[domain].com" but you may want to check with the customer's IT to make sure it will work and not get spam-blocked

1 Like