Class VelocityMailTemplate

java.lang.Object
de.aikiit.mailversendala.template.VelocityMailTemplate

public class VelocityMailTemplate extends Object
Compiles external UTF-8 templates once per run and renders isolated recipient contexts. HTML references are escaped; plain-text references are left unchanged.
  • Constructor Details

    • VelocityMailTemplate

      public VelocityMailTemplate(MailConfig configuration) throws IOException
      Load both templates from the configured external directory before sending begins.
      Parameters:
      configuration - directory and template filenames.
      Throws:
      IOException - if a template is missing, unreadable or syntactically invalid.
  • Method Details

    • render

      public MailTemplate render(Mailing recipient)
      Render both alternatives for one recipient, without retaining recipient state.
      Parameters:
      recipient - CSV recipient data.
      Returns:
      rendered HTML and plain-text bodies.