cancel
Showing results for 
Search instead for 
Did you mean: 

Attach a document into an email

mvicidomini
Champ in-the-making
Champ in-the-making
Hello all,

i would like to attach a document when it is uploaded to alfresco. I know that there is the default notification from the workflow but for internal reason my customers ask me to attach the original document into an email. I have writen a small script but i don't manage to attach the document does somebody has a solution thanks a lot.

var mail = actions.create("mail");
var docName = document.properties["name"];
var siteShortName = document.siteShortName;
//var mySite = getSite(shortName);
var prop = document.properties["nodeRef"]
mail.parameters.to = "MY EMAIL";
mail.parameters.subject = "Ajout de document";
mail.parameters.from = "MY EMAIL";
mail.parameters.text = "Ajout du document " + docName + "Sur le site: "+siteShortName+" Projet : "+space.name ;
mail.execute(document);
64 REPLIES 64

iphost_zan
Confirmed Champ
Confirmed Champ

Hi Bob, 

I don´t see the file in the portal. 

Could you please show me the link than where i can download? 

Thank you so much

Paul 

Search for the words email attachment and it’s the top of the list.

Direct URL

https://community.alfresco.com/docs/DOC-6574-send-html-mail-with-attachments

Bob

Hi Bob 

Thank you ! 

In witch path I have to put this files?  

Regards

{your alfresco installation root}/tomcat/webapps/alfresco/WEB-INF/lib

Hi Bob

Thank you ! 

Paul