io.vertx.ext.mail

## Interface MailService

- All Superinterfaces:
    MailClient

      public interface MailService
      extends MailClient

  Author:
    Tim Fox

- - ### Field Summary

    - ### Fields inherited from interface io.vertx.ext.mail.MailClient

      `DEFAULT_POOL_NAME`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` close the MailClient
    `static MailService` | `createEventBusProxy(Vertx vertx, String address)` create a proxy of MailService that delegates to the mail service running somewhere else via the event bus
    `MailService` | `sendMail(MailMessage email, Handler<AsyncResult<MailResult>> resultHandler)` send a single mail via MailClient

    - ### Methods inherited from interface io.vertx.ext.mail.MailClient

      `create, createNonShared, createShared, createShared`

- - ### Method Detail

    - #### createEventBusProxy

          static MailService createEventBusProxy(Vertx vertx,
                                                 String address)

      create a proxy of MailService that delegates to the mail service running somewhere else via the event bus
      Parameters:
        `vertx` - the Vertx instance the proxy will be run in
        `address` - the eb address of the mail service running somewhere, default is "vertx.mail"
      Returns:
        MailService instance that can then be used to send multiple mails

    - #### sendMail

          MailService sendMail(MailMessage email,
                               Handler<AsyncResult<MailResult>> resultHandler)

      Description copied from interface: `MailClient`
      send a single mail via MailClient
      Specified by:
        `sendMail` in interface `MailClient`
      Parameters:
        `email` - MailMessage object containing the mail text, from/to, attachments etc
        `resultHandler` - will be called when the operation is finished or it fails (may be null to ignore the result)
      Returns:
        this MailClient instance so the method can be used fluently

    - #### close

          void close()

      Description copied from interface: `MailClient`
      close the MailClient
      Specified by:
        `close` in interface `MailClient`

Copyright © 2022 Eclipse. All rights reserved.