How to send Email
Using "email" directive you can send email to any recipients.<@email /> Directive Syntax
Syntax : <@email to="email-address" cc="email-address" bcc="email-address" subject="subject" body="email message" from="<admin-email>" adminOnly=true|false attachment="temp/hello.pdf" /> Send to admin Only : <@email subject="subject" body="email message" from="<admin-email>" adminOnly=true /> Send to multiple recipients (using Freemarker sequence) : <@email to=["add1","add2"] subject="subject" body="email message" from="<admin-email>" /> "cc" and "bcc" also supports multiple values. Send multiple attachments : <@email to=["add1","add2"] subject="subject" body="email message" from="<admin-email>" attachment=["path/file1", "path/file2"] /> Where "file1" and "file2" are file on VFS (Virtual File System).
Note: The "from" address must be valid administrator's email address.
Formatted email
Using Freemarker "assign" directive you can create a variable with HTML formatted text.<#assign emailTxt> I am <b> bold </b> text. </#assign> Use variable "emailTxt" with email directive, <@email to="email-address" subject="subject" body=emailTxt from="<admin-email>" />
blog comments powered by Disqus
Last Modified : Jul 10, 2009 2:16:32 PM