Skip to main content
Inspiring
February 17, 2021
Question

Send a mail to multiple people

  • February 17, 2021
  • 16 replies
  • 0 views

I need to send mail to multiple people based on selected location..

lets say: I need to send mail to people based on selected location.

There are multiple location (A,B,C,D)

There mail needs to be sent to 4 people: (M1,M2,M3,M4).

If i select Location A then a mail should be triggered to that location only and all  4 people should receive mail for that particular location.

Can someone help with the logic 

    16 replies

    mikes0011
    Brainy
    February 17, 2021

    Create an expression rule where you pass in the location ID of your choice, and possibly any other identifying information, and as an output, returns the email addresses for the desired target audience.  This would just be an array of text where each member is an email address, and you probably need to wrap it in the toEmailAddress() function for it to play nice with the Send Email node (i've never been sure why).  Then you just set the "To:" field in the Send Email node with that expression rule.

    The Expression Guru
    Inspiring
    February 24, 2021

    Hi Mike i have used your logic but am getting below Error

    karthikr067273
    Inspiring
    February 24, 2021

    Hi Akshayg,
    What type of value are you passing to toemailaddress()?
    Did you try that expression separately with the same input? Si it returning valid email addresses?
    try that expression separately and make sure it is returning valid email addresses.