try{
if(!document.isContainer){
var dossier1=space.parent.parent.properties.name
var dossier2=space.parent.parent.parent.properties.name
var dossier3=space.parent.parent.parent.parent.properties.name
if(dossier1== "Sites")
var dossier=space.parent.properties.name;
if(dossier2== "Sites")
var dossier=dossier1;
if(dossier3== "Sites")
var dossier=dossier2;
var group = people.getGroup("GROUP_site_"+dossier+"_SiteCollaborator");
var persons = people.getMembers(group);
for each (person in persons){
if(person.properties.userName != "admin" && person.properties.userName != "guest"){
var email = person.properties.email;
if(email)
sendMail(email);
}
}
}
}
catch(exception){
throw exception;
}
function sendMail(email){
// create mail action
var mail = actions.create("mail");
mail.parameters.to = email;
mail.parameters.subject = "Nouveau document dans l'espace " + dossier + ".";
mail.parameters.from = "admin@alfresco.fr";
mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Email_notification_doc_espaces.ftl");
mail.parameters.text =Erreur template ; //"some text, in case template is not found" ;
// execute action against a document
mail.execute(document);
}
<#assign dossier1=space.parent.parent.name>
<#assign dossier2=space.parent.parent.parent.name>
<#assign dossier3=space.parent.parent.parent.parent.name>
<#if dossier1== "Sites">
<#assign dossier=space.parent.name>
<#elseif dossier2== "Sites">
<#assign dossier=dossier1>
<#elseif dossier3== "Sites">
<#assign dossier=dossier2>
</#if>
Bonjour,
Un nouveau document nommé "${document.name}" a été ajouté par ${person.properties.firstName} <#if person.properties.lastName?exists> ${person.properties.lastName}</#if> dans le dossier "${dossier}".
Cliquer ici pour accéder à ce document : http://serveur/share/page/site/${dossier}/document-details?nodeRef=${document.nodeRef}
Cliquer ici pour accéder à la GED : http://serveur/share
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.