Interface MailManager

All Superinterfaces:
MailConfigurationService
All Known Implementing Classes:
MailManagerImpl

public interface MailManager extends MailConfigurationService
  • Method Details

    • sendTestMail

      SendTestMailResult sendTestMail(SMTPServer smtpServer, jakarta.mail.internet.InternetAddress emailAddress) throws MailSendException
      Send a test email using the supplied mail server (remote host / JNDI)
      Parameters:
      smtpServer - supplied SMTP Server, which will be used to send message.
      emailAddress - address of recipient.
      Returns:
      result of test, which contains logs and status.
      Throws:
      MailSendException - an error occurred sending the email.
      Since:
      3.2
    • sendEmails

      Collection<? extends EmailMessage> sendEmails(Collection<? extends EmailMessage> messagesToSend) throws MailSendException
      Sends multiple emails using the configured mail server.
      Returns:
      a collection of messages that failed to be sent
      Throws:
      MailSendException - an error occurred that prevented sending any email (connection error, configuration error, etc.).
      Since:
      3.3
    • sendEmail

      void sendEmail(EmailMessage messageToSend) throws MailSendException
      Sends a single email using the configured mail server
      Parameters:
      messageToSend - single email using the configured mail server
      Throws:
      MailSendException - an error occurred sending the email.
      Since:
      4.4.0
    • validateConfiguration

      List<ValidationError> validateConfiguration(MailConfiguration mailConfiguration)
      Verifies whether the specified MailConfiguration is valid
      Parameters:
      mailConfiguration - entity with attributes to be validated
      Returns:
      a list with errors found in the configuration
      Since:
      3.2