SMTP mail client for Vert.x
A simple asynchronous API for sending mails from Vert.x applications
| Constructor and description |
|---|
MailClient
(Object delegate) |
| Type | Name and description |
|---|---|
void |
close()close the MailClient |
static MailClient |
createNonShared(Vertx vertx, Map<String, Object> config)create a non shared instance of the mail client |
static MailClient |
createShared(Vertx vertx, Map<String, Object> config, String poolName)Create a Mail client which shares its data source with any other Mongo clients created with the same pool name |
static MailClient |
createShared(Vertx vertx, Map<String, Object> config)Like MailClient.createShared but with the default pool name |
Object |
getDelegate() |
MailClient |
sendMail(Map<String, Object> email = [:], Handler<AsyncResult<Map<String, Object>>> resultHandler)send a single mail via MailClient |
close the MailClient
create a non shared instance of the mail client
vertx - the Vertx instance the operation will be run inconfig - MailConfig configuration to be used for sending mails (see MailConfig)Create a Mail client which shares its data source with any other Mongo clients created with the same pool name
vertx - the Vert.x instanceconfig - the configuration (see MailConfig)poolName - the pool nameLike MailClient.createShared but with the default pool name
vertx - the Vert.x instanceconfig - the configuration (see MailConfig)send a single mail via MailClient
email - MailMessage object containing the mail text, from/to, attachments etc (see MailMessage)resultHandler - will be called when the operation is finished or it fails (may be null to ignore the result)io.vertx:vertx-mail-client:3.1.0