Class MailService

java.lang.Object
org.ctan.site.services.mail.MailService

public class MailService extends Object
The class MailService contains a service to send mails.

A mail template can be used. This is processed with Apache FreeMarkerâ„¢ to apply substitutions.

  • Constructor Details

    • MailService

      public MailService(@NonNull @NonNull CtanConfiguration.MailConfig cfg)
      This is the constructor for the class MailService.
      Parameters:
      cfg - the configuration
  • Method Details

    • send

      public jakarta.mail.internet.MimeMessage send(@NonNull @NonNull MailService.Mail mail) throws MailException
      The method send provides means to sent an email.
      Parameters:
      mail - the data for the mail to be sent
      Returns:
      the message sent
      Throws:
      MailException - in case of an error