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.
Sends an email using the email system to the specified recipient.
- Version:
- 2.0.3
- Author:
- Stephen Prizio
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetSystemRecipient(io.github.cdimascio.dotenv.Dotenv dotenv) Gets the system recipient from the environment.voidsendEmail(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- recipientsubject- email subjectemailTemplate-EmailTemplatetemplateValues- variables
-
getSystemRecipient
Gets the system recipient from the environment.- Parameters:
dotenv-Dotenv- Returns:
- system recipient
-