Script to send email
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 09:33 AM
Good morning,
I want to refer to users or groups within a current space, and send an email notifying all of them. I don't use a rule that sends email because I need the document's name in subject.
I created a rule and executed a script. But I can't find out how to send the mail to the groups without naming the group specifically. I've tried
var siteGroup = "GROUP_MP_Admin";
mail.parameters.to_many=siteGroup;
But I need the group to be variable.
Regards,
Marcela
I want to refer to users or groups within a current space, and send an email notifying all of them. I don't use a rule that sends email because I need the document's name in subject.
I created a rule and executed a script. But I can't find out how to send the mail to the groups without naming the group specifically. I've tried
var siteGroup = "GROUP_MP_Admin";
mail.parameters.to_many=siteGroup;
But I need the group to be variable.
Regards,
Marcela
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 10:44 AM
I'm not very clear what you mean.
A little suggestion:
You can save your group name in a property of your space node or other nodes, then get the group name in your script from the space node(or other nodes).
A little suggestion:
You can save your group name in a property of your space node or other nodes, then get the group name in your script from the space node(or other nodes).
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 12:30 PM
Thank you very much! I solved it the way you suggested, I add this sentences in my script:
var siteGroup = "GROUP_MP_"+space.parent.name+space.name;
mail.parameters.to_many=siteGroup;
And the group has the name exactly as the spaces referred.
var siteGroup = "GROUP_MP_"+space.parent.name+space.name;
mail.parameters.to_many=siteGroup;
And the group has the name exactly as the spaces referred.
