Package io.micronaut.email
Interface AsyncTransactionalEmailSender<I,O>
- Type Parameters:
I
- Email RequestO
- Email Response
- All Superinterfaces:
io.micronaut.core.naming.Named
- All Known Implementing Classes:
AbstractTransactionalEmailSender
,AsyncSesEmailSender
,JavaxEmailSender
,MailjetEmailSender
,PostmarkEmailSender
,SendgridEmailSender
public interface AsyncTransactionalEmailSender<I,O>
extends io.micronaut.core.naming.Named
Contract to send emails Asynchronously.
Emails are validated.
- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Method Details
-
sendAsync
@NonNull @SingleResult default @NonNull org.reactivestreams.Publisher<O> sendAsync(@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
-
sendAsync
@NonNull @SingleResult @NonNull org.reactivestreams.Publisher<O> sendAsync(@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
-