Package io.micronaut.email
Interface TransactionalEmailSender<I,O>
- Type Parameters:
I
- Email RequestO
- Email Response
- All Superinterfaces:
io.micronaut.core.naming.Named
- All Known Implementing Classes:
AbstractTransactionalEmailSender
,JavaxEmailSender
,MailjetEmailSender
,PostmarkEmailSender
,SendgridEmailSender
,SesEmailSender
public interface TransactionalEmailSender<I,O>
extends io.micronaut.core.naming.Named
API to be implemented by third party transactional email providers.
Emails are validated.
- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Method Summary
Methods inherited from interface io.micronaut.core.naming.Named
getName
-
Method Details
-
send
@NonNull default O send(@NonNull @NotNull @Valid @NonNull @NotNull @Valid Email email) throws EmailException Sends an email.- Parameters:
email
- Email- Returns:
- Response Object or empty optional if an error occurred
- Throws:
EmailException
- Wrapper of any exception thrown while sending email
-
send
@NonNull O send(@NonNull @NotNull @Valid @NonNull @NotNull @Valid Email email, @NonNull @NotNull @NonNull @NotNull Consumer<I> emailRequest) throws EmailException Sends an email.- Parameters:
email
- EmailemailRequest
- Email Request Consumer- Returns:
- Response Object or empty optional if an error occurred
- Throws:
EmailException
- Wrapper of any exception thrown while sending email
-