Alarm Pipeline Notify Block only sends email to first user in dynamic roster

Hi everyone,

I am using an Ignition Alarm Pipeline and want to send email notifications using the Notify block.

The roster is built dynamically by a script:

logger = system.util.getLogger("sendMail")
recievers = system.tag.readBlocking("[internal]Services/email/recievers")[0].value

roster = []
for r in recievers:
    if isValidEmail(r["email"]):
        temp = { "username": r["username"], "email": [r["email"]] }
        roster.append(temp)
    else:
        logger.info(u"E-Mail: %s is not valid and will be ignored" % r["email"])

logger.debug("Send to: %s" % system.util.jsonEncode(roster))
return roster


import re

def isValidEmail(email):
    if email is None:
        return False

    email = email.strip()

    pattern = r'^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$'

    return re.match(pattern, email) is not None

The resulting roster looks like this:

[
  {
    "email": ["xxx@xx.com"],
    "username": "User1"
  },
  {
    "email": ["xxx@xxx.com"],
    "username": "User2"
  }
]

When I set the Notify block to Test Mode, the logs indicate that an email would be sent to both users.

However, when I disable Test Mode, only the first user in the roster actually receives an email. If I swap the order of the users in the roster array, then the other user receives the email instead. So it always seems to send only to the first entry.

I have also tried adding debug logs to find any errors, but there are no error messages or warnings in the logs.

Has anyone seen this behavior before, or does anyone have an idea what could cause the Notify block to only send to the first roster entry when Test Mode is disabled?

Thanks in advance!

I'd check if its something with your SMTP server having some kind of rate limit where it doesn't want to fire multiple emails at once.

If you have consolidation turned on in the alarm block maybe disable that, IIRC there was a minor bug in an older rev that caused issues with that but I don't think it's present in 8.3 so likely not going to help but it only takes a few seconds to try.