cancel
Showing results for 
Search instead for 
Did you mean: 

Need javascript to sent email

samnaction
Champ in-the-making
Champ in-the-making
I need a javascript to sent email whenever new site is created
5 REPLIES 5

sanket
Champ on-the-rise
Champ on-the-rise
Refer these links. They'll help you.

http://forums.alfresco.com/forum/developer-discussions/other-apis/javascript-send-mails-only-site-ma...

https://forums.alfresco.com/forum/developer-discussions/web-scripts/sending-email-action-09072010-16...

And as you mentioned that you want this script to be executed when you create a new site.
For doing that, create a rule under Company Home/Sites folder which will execute your script upon site creation.

samnaction
Champ in-the-making
Champ in-the-making
Sorry I am not familiar with the java script from the example given in the link it will send email to members of site. I need to send email whenever a new site is created which dont have any members

sanket
Champ on-the-rise
Champ on-the-rise
Refer the second link - https://forums.alfresco.com/forum/developer-discussions/web-scripts/sending-email-action-09072010-16...
In this link, it's mentioned that you can send email to a person whose email is explicitly specified by you.
Write the javascript code in a js file. Put it under Data Dictionary/Scripts.

And ss I mentioned previously, create a rule under Company Home/Sites folder which will execute your script when you create a new site.

samnaction
Champ in-the-making
Champ in-the-making
I am getting this error

02240109 Failed to execute script 'workspace://SpacesStore/5026e853-005d-426d-87ef-0b45b5899766': syntax error (workspace://SpacesStore/5026e853-005d-426d-87ef-0b45b5899766#13)