Reputation: 1254
Here is my java script
var siteGroup = "GROUP_EMAIL_CONTRIBUTORS";
var mail = actions.create("mail");
mail.parameters.to_many = siteGroup;
var url = "Click http://pc1:8080/share/page/site/" + document.properties.name + "/dashboard" + " to join the site";
mail.parameters.subject="New Site Created in Community";
mail.parameters.text=url;
//execute action against a document
mail.execute(document);
The siteGroup
has three members with three different email address. The problem is this java script is sending three email notification to all the three users. If I add one more member then each will get four email. How to suppress this?
Upvotes: 1
Views: 286
Reputation: 6643
You need create a subtype of st:site to make sure it only triggers on the site.
There are 2 options:
Example, this snippet needs to be between de alfresco-config tags:
<config evaluator="string-compare" condition="DocumentLibrary">
<types>
<type name="cm:folder">
<subtype name="st:site" />
</type>
</types>
</config>
Upvotes: 2