io.vertx.ext.mail

## Interface MailService

- All Superinterfaces:
    MailClient
  All Known Implementing Classes:
    MailServiceVertxEBProxy

      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

      `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 © 2017. All rights reserved.