This class allows you to send HTML email with embedded content and/or with attachments. You can access the VelocityHtmlEmail instance within your templates trough the $mail
Velocity variable.
VelocityHtmlEmail myEmail= new VelocityHtmlEmail(data);
or
context.put("mail", myMail);VelocityHtmlEmail myEmail= new VelocityHtmlEmail(context);
context.put("mail", myMail);
The templates should be located under your Template turbine directory.
This class wraps the HtmlEmail class from commons-email. Thus, it uses the JavaMail API and also depends on having the mail.server property set in the TurbineResources.properties file. If you want to use this class outside of Turbine for general processing that is also possible by making sure to set the path to the TurbineResources.properties. See the TurbineResourceService.setPropertiesFileName() method for more information.
This class is basically a conversion of the WebMacroHtmlEmail written by Regis Koenig
You can turn on debugging for the JavaMail API by calling setDebug(true). The debugging messages will be written to System.out. @author Eric Pugh @author Andre Schild @author Quinton McCombs @author Henning P. Schmiedehausen @version $Id: VelocityHtmlEmail.java 264148 2005-08-29 14:21:04Z henning $
|
|
|
|