Multiple email addresses for Workflow notifications - Perficient Blogs
Blog
  • Topics
  • Industries
  • Partners

Explore

Topics

Industries

Partners

Multiple email addresses for Workflow notifications

Workflows in Sitecore are an integral part of the content approval process. The email notification action is an important part of that process, in that it lets content approvers know that something is waiting for their attention. Out-of-the-box implementations of the notification actions only support a single email address to receive the messages. This can be problematic if there is a team of approvers and they all need to be aware of an item pending their attention. In the past, for large numbers of recipients, I’ve set up distribution lists to let all of the approvers receive the message. This can be problematic, though, if only 1 or 2 recipients are needed for multiples actions.
Sitecore support directed me to the following location: /sitecore/templates/System/Workflow/Email action/Data/To. The Validation field for this item contains the regex used to validate the email field and only validates against a single email address.

^([\w-_.]*[\w-_.]@([\w]+\.+)[\w]+[\w])?$

oobsitecoreworkflowemailtoaction
Entering comma separated email address, shown below, presents a validation error.
oobsitecoreworkflowemailtoaction2
oobsitecoreworkflowemailtoaction3
Adding the following regex to the Validation field allows me to save multiple, comma separated email addresses.

^([\w+-.%]+@[\w-.]+\.[A-Za-z]{2,4},?)+$

oobsitecoreworkflowemailtoactionnewregex
Sitecore support has registered this as a Wish request and provided the reference number 93362 to use to track the status. I can’t say when this functionality will be available out-of-the-box, but we now have a workaround and it will be included sometime in the future.
If you have any questions about this post or suggestions for other topics you would like to see covered, please feel free to reach out below in the comments section or you can reach me on Twitter @bill_cacy .
Thanks for reading!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to the Weekly Blog Digest:

Sign Up