
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2019 08:42 AM
Hi all,
I would like to send a E-mail to multiple user by using Email notification.
Now, I set up like as below.
-a business rule creates a event by using "gs.eventQueue()"
-the event gets pram 1 correctlly
-the value of parm 1 is "xxx@example.com, yyy@example.com, zzz@example.com"
-a event trigers E-mail notification and a E-mail is sent
-the recipients of the E-mail is only "xxx@example.com"
How should I set some E-mail addresses to Parm 1?
If someone knows, please let me know.
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2019 08:47 AM
Hi,
You will have to create a loop in business rule.
For example:
var emailID = "xxx@example.com, yyy@example.com, zzz@example.com";
var spl = emailID.split(',');
var len = spl.length;
for(var i=0; i<len;i++){
gs.eventQueue('eventname',current,spl(i));
}
Note: Please check this code properly. Consider this to be sample.
THanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2019 08:47 AM
Hi,
You will have to create a loop in business rule.
For example:
var emailID = "xxx@example.com, yyy@example.com, zzz@example.com";
var spl = emailID.split(',');
var len = spl.length;
for(var i=0; i<len;i++){
gs.eventQueue('eventname',current,spl(i));
}
Note: Please check this code properly. Consider this to be sample.
THanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2019 08:52 AM
Hi Ashutosh,
Thank you for very quick response.
You mean, I should create some events and call E-mail notification some times correct?
I think it will work very well.
Thank you so much^^!
Kent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2019 09:02 AM
Hi,
You can use same event, that event should be in for loop. So that it will trigger for all email id which you have. For example: if you have 3 emails in var emailID then event will trigger for 3 times i.e. for loop will run for 3 times as we have seperated emails by spliting them and we have length of split in len variable.
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2019 04:40 PM
Hi Ashutosh,
I understood and it is working well.
Thank you so much!
Kent