Interface AsyncEmailSender<I,O>

Type Parameters:
I - Email Request
O - Email Response
All Superinterfaces:
io.micronaut.core.naming.Named
All Known Implementing Classes:
DefaultAsyncEmailSender

public interface AsyncEmailSender<I,O> extends io.micronaut.core.naming.Named
Defines a functional interface to send transactional emails asynchronously.
Since:
1.0.0
Author:
Sergio del Amo
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NonNull org.reactivestreams.Publisher<O>
    sendAsync(Email.Builder emailBuilder)
    Sends an email.
    @NonNull org.reactivestreams.Publisher<O>
    sendAsync(Email.Builder emailBuilder, @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 Email.Builder emailBuilder) throws EmailException
      Sends an email.
      Parameters:
      emailBuilder - Email Builder
      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 Email.Builder emailBuilder, @NonNull @NotNull @NonNull @NotNull Consumer<I> emailRequest) throws EmailException
      Sends an email.
      Parameters:
      emailBuilder - Email Builder
      emailRequest - Email Request
      Returns:
      Response Object or empty optional if an error occurred
      Throws:
      EmailException - Wrapper of any exception thrown while sending email