io.vertx.rxjava.ext.mail

## Class MailClient

- java.lang.Object
- - io.vertx.rxjava.ext.mail.MailClient

- Direct Known Subclasses:
    MailService

      public class MailClient
      extends Object

  SMTP mail client for Vert.x

  A simple asynchronous API for sending mails from Vert.x applications

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TypeArg<MailClient>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MailClient(MailClient delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` close the MailClient
    `static MailClient` | `createNonShared(Vertx vertx, MailConfig config)` create a non shared instance of the mail client
    `static MailClient` | `createShared(Vertx vertx, MailConfig config)` Like `createShared(io.vertx.rxjava.core.Vertx, io.vertx.ext.mail.MailConfig, java.lang.String)` but with the default pool name
    `static MailClient` | `createShared(Vertx vertx, MailConfig config, String poolName)` Create a Mail client which shares its data source with any other Mongo clients created with the same pool name
    `MailClient` | `getDelegate()`
    `static MailClient` | `newInstance(MailClient arg)`
    `rx.Single<MailResult>` | `rxSendMail(MailMessage email)` send a single mail via MailClient
    `MailClient` | `sendMail(MailMessage email, Handler<AsyncResult<MailResult>> resultHandler)` send a single mail via MailClient
    `rx.Observable<MailResult>` | `sendMailObservable(MailMessage email)` Deprecated. use `rxSendMail(io.vertx.ext.mail.MailMessage)` instead

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final TypeArg<MailClient> __TYPE_ARG

  - ### Constructor Detail

    - #### MailClient

          public MailClient(MailClient delegate)

  - ### Method Detail

    - #### getDelegate

          public MailClient getDelegate()

    - #### createNonShared

          public static MailClient createNonShared(Vertx vertx,
                                                   MailConfig config)

      create a non shared instance of the mail client
      Parameters:
        `vertx` - the Vertx instance the operation will be run in
        `config` - MailConfig configuration to be used for sending mails
      Returns:
        MailClient instance that can then be used to send multiple mails

    - #### createShared

          public static MailClient createShared(Vertx vertx,
                                                MailConfig config,
                                                String poolName)

      Create a Mail client which shares its data source with any other Mongo clients created with the same pool name
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration
        `poolName` - the pool name
      Returns:
        the client

    - #### createShared

          public static MailClient createShared(Vertx vertx,
                                                MailConfig config)

      Like `createShared(io.vertx.rxjava.core.Vertx, io.vertx.ext.mail.MailConfig, java.lang.String)` but with the default pool name
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration
      Returns:
        the client

    - #### sendMail

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

      send a single mail via 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

    - #### sendMailObservable

          @Deprecated
          public rx.Observable<MailResult> sendMailObservable(MailMessage email)

      Deprecated. use `rxSendMail(io.vertx.ext.mail.MailMessage)` instead
      send a single mail via MailClient
      Parameters:
        `email` - MailMessage object containing the mail text, from/to, attachments etc
      Returns:

    - #### rxSendMail

          public rx.Single<MailResult> rxSendMail(MailMessage email)

      send a single mail via MailClient
      Parameters:
        `email` - MailMessage object containing the mail text, from/to, attachments etc
      Returns:

    - #### close

          public void close()

      close the MailClient

    - #### newInstance

          public static MailClient newInstance(MailClient arg)

Copyright © 2017. All rights reserved.