Interface EmailService

All Known Implementing Classes:
ScheduledJobEmailService, SimpleEmailService
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EmailService
Sends an email using the email system to the specified recipient.
Version:
2.0.3
Author:
Stephen Prizio
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    getSystemRecipient(io.github.cdimascio.dotenv.Dotenv dotenv)
    Gets the system recipient from the environment.
    void
    sendEmail(String to, String subject, EmailTemplate emailTemplate, Map<String,Object> templateValues)
    Sends an email to the recipient at the given to address.
  • Method Details

    • sendEmail

      void sendEmail(String to, String subject, EmailTemplate emailTemplate, Map<String,Object> templateValues)
      Sends an email to the recipient at the given to address.
      Parameters:
      to - recipient
      subject - email subject
      emailTemplate - EmailTemplate
      templateValues - variables
    • getSystemRecipient

      default String getSystemRecipient(io.github.cdimascio.dotenv.Dotenv dotenv)
      Gets the system recipient from the environment.
      Parameters:
      dotenv - Dotenv
      Returns:
      system recipient