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
Discussion posts and replies are publicly visible
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.
Hi Mike i have used your logic but am getting below Error
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.
Hi Karthik ... that rule is working fine and returning value.. But for some location Say B don't have Email Address for M3 and M4 ..for that am using XOR gate