Class MailClient
java.lang.Object
io.vertx.reactivex.ext.mail.MailClient
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<MailClient> static final StringThe name of the default pool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MailClientBuilderProvide a builder forMailClient.close()Close the MailClientstatic MailClientcreate(Vertx vertx, MailConfig config) Create a non shared instance of the mail client.static MailClientcreateShared(Vertx vertx, MailConfig config) LikecreateShared(Vertx, MailConfig, String)but with the default pool namestatic MailClientcreateShared(Vertx vertx, MailConfig config, String poolName) Create a Mail client which shares its connection pool with any other Mail clients created with the same pool namebooleaninthashCode()static MailClientnewInstance(MailClient arg) rxClose()Close the MailClientrxSendMail(MailMessage email) send a single mail via MailClientsendMail(MailMessage email) send a single mail via MailClienttoString()
-
Field Details
-
__TYPE_ARG
-
DEFAULT_POOL_NAME
-
-
Constructor Details
-
MailClient
-
MailClient
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
builder
Provide a builder forMailClient.It can be used to configure advanced settings like changing credentials with
MailClientBuilder.withCredentialsSupplier(Supplier).- Parameters:
vertx-- Returns:
-
create
Create a non shared instance of the mail client.- Parameters:
vertx- the Vertx instance the operation will be run inconfig- MailConfig configuration to be used for sending mails- Returns:
- MailClient instance that can then be used to send multiple mails
-
sendMail
send a single mail via MailClient- Parameters:
email- MailMessage object containing the mail text, from/to, attachments etc- Returns:
- a future notified when the operation is finished or it fails (may be null to ignore the result)
-
rxSendMail
send a single mail via MailClient- Parameters:
email- MailMessage object containing the mail text, from/to, attachments etc- Returns:
- a future notified when the operation is finished or it fails (may be null to ignore the result)
-
close
-
rxClose
-
newInstance
-