Class FMMailUtils

java.lang.Object
com.vdoc.sdk.commons.freemarker.FMMailUtils

@Deprecated public class FMMailUtils extends Object
Deprecated.
Author:
famaridon
See Also:
  • Method Details

    • evaluateMessage

      public static jakarta.mail.internet.MimeMessage evaluateMessage(String subject, String templateName, Map<String,Object> parameters) throws IOException, freemarker.template.TemplateException, jakarta.mail.MessagingException
      Deprecated.
      The MimeMessage FROM field is set with the server configuration.
      Parameters:
      subject - the mail subject
      templateName - the .ftl file name under the 'resources/fm/templates/mail/' folder.
      parameters - freemarker data.
      Returns:
      the evaluated message
      Throws:
      IOException - if the .ftl can't be read
      freemarker.template.TemplateException - if the .ftl contain error
      jakarta.mail.MessagingException - on error
      jakarta.mail.internet.AddressException - on error
    • evaluateMessage

      public static jakarta.mail.internet.MimeMessage evaluateMessage(String subject, String templateName, String mimeType, Map<String,Object> parameters) throws IOException, freemarker.template.TemplateException, jakarta.mail.MessagingException
      Deprecated.
      The MimeMessage FROM field is set with the server configuration.
      Parameters:
      subject - the mail subject
      templateName - the .ftl file name under the 'resources/fm/templates/mail/' folder.
      mimeType - the mime type
      parameters - freemarker data.
      Returns:
      the evaluated message
      Throws:
      IOException - if the .ftl can't be read
      freemarker.template.TemplateException - if the .ftl contain error
      jakarta.mail.MessagingException - on error
      jakarta.mail.internet.AddressException - on error