SMTP mail client for Vert.x
A simple asynchronous API for sending mails from Vert.x applications
| Constructor and description |
|---|
MailClient
(java.lang.Object delegate) |
| Type | Name and description |
|---|---|
void |
close()close the MailClient |
static MailClient |
createNonShared(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> config)create a non shared instance of the mail client |
static MailClient |
createShared(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> config, java.lang.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, java.util.Map<java.lang.String, java.lang.Object> config)Like MailClient.createShared but with the default pool name |
java.lang.Object |
getDelegate() |
MailClient |
sendMail(java.util.Map<java.lang.String, java.lang.Object> email = [:], io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)send a single mail via MailClient |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
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)