O'Reilly logo

Alfresco 3 Cookbook by Snig Bhaumik

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sending e-mails using a mail template

In this recipe, we will create a Web Script that will send a mail to a particular defined user. The content of the mail will be driven by a mail template. Finally, the mail content is returned as the Web Script response.

How to do it...

  1. We will first create a Mail Template. Here is the template:
    Hello ${person.properties["cm:firstName"]},
    Welcome to Alfresco!
    Here are your registration details.
    First Name: ${person.properties["cm:firstName"]}
    Last Name: ${person.properties["cm:lastName"]}
    User Name: ${person.properties["cm:userName"]}
    Enjoy your Stay!
    Regards,
    the Alfresco Team.
    
  2. Save this template in the Company Home | Data Dictionary | EMail Templates folder—with the name userdetailsmail.ftl
  3. Now, we will create ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required