Is it possible to dynamically build the “From Address” for an email alarm notification block using an alarm’s associated data or some other variable or tag?
I have a user input that triggers an alarm and an associated notification pipeline, and I’d like pass the logged in user from that client’s input to be used in the From Address, if possible.
Hello! No, you cannot have a dynamic “From Address” configured in the notification block.
But I know you can use the system.net.sendEmail() function and have a dynamic “fromAddr” here. So if you can use scripting instead. It might suit your email. Hope that helps!
In every mail server I’ve seen the “From Address” you send an email with has to match or be associated with the credentials you configured that SMTP connection with anyway, so a dynamic “From Address” doesn’t really make much sense - there is usually only one correct value.
I have a customer that has defined a “control system” email from address pattern, so many subsystems can have their own from address via the same Ignition gateway. The pattern clearly indicates the messages are auto-generated, and the client’s mail servers will only deliver them internally.
In short, dynamic from addresses are a real thing in this space.
I knew you of all people were going to counterexample this
It’s just not very common. The vast majority of people are using Gmail or O365 and call support wondering why their SMTP server rejects their mismatched From Address.
The problem I am currently having is that the pipelines are defined in the EAM and then distributed to the agent servers. Each agent server has its own authenticated email with the server. if the notification block's 'from address' was dynamic I can generate the correct 'from address' from the script before the notification block and create an event scoped variable for the 'from address' Any suggestions on how I can still accomplish this. We have over 50 servers to manage.