public interface MailClient
A simple asynchronous API for sending mails from Vert.x applications
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close the MailClient
|
static MailClient |
create(Vertx vertx,
MailConfig config)
create an instance of MailClient that is running in the local JVM
|
MailClient |
sendMail(MailMessage email,
Handler<AsyncResult<MailResult>> resultHandler)
send a single mail via MailClient
|
static MailClient create(Vertx vertx, MailConfig config)
vertx - the Vertx instance the operation will be run inconfig - MailConfig configuration to be used for sending mailsMailClient sendMail(MailMessage email, Handler<AsyncResult<MailResult>> resultHandler)
email - MailMessage object containing the mail text, from/to, attachments etcresultHandler - will be called when the operation is finished or it fails
(may be null to ignore the result)
the result JsonObject currently only contains {"result":"success"}void close()
Copyright © 2015. All Rights Reserved.