# Class: MailClient

## vertx-mail-js/mail_client~ MailClient

#### new MailClient()

  SMTP mail client for Vert.x

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

  Source:
    - mail_client.js, line 35

### Methods

#### close()

  close the MailClient
  Source:
    - mail_client.js, line 68

#### sendMail(email, resultHandler) → {MailClient}

  send a single mail via MailClient

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `email` | Object | MailMessage object containing the mail text, from/to, attachments etc
  `resultHandler` | function | will be called when the operation is finished or it fails (may be null to ignore the result)

  Source:
    - mail_client.js, line 48

  ##### Returns:

  this MailClient instance so the method can be used fluently
  Type
    MailClient