Interface AsyncTransactionalEmailSender<I,O>

Type Parameters:
I - Email Request
O - 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 Summary

    Modifier and Type
    Method
    Description
    default @NonNull org.reactivestreams.Publisher<O>
    sendAsync(@NonNull @NotNull @Valid Email email)
    Sends an email.
    @NonNull org.reactivestreams.Publisher<O>
    sendAsync(@NonNull @NotNull @Valid Email email, @NonNull @NotNull Consumer<I> emailRequest)
    Sends an email.

    Methods inherited from interface io.micronaut.core.naming.Named

    getName
  • 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 - Email
      emailRequest - Email Request Consumer
      Returns:
      Response Object or empty optional if an error occurred
      Throws:
      EmailException - Wrapper of any exception thrown while sending email