Package io.vertx.rxjava3.ext.mail
Class MailClient
java.lang.Object
io.vertx.rxjava3.ext.mail.MailClient
- All Implemented Interfaces:
RxDelegate
SMTP mail client for Vert.x
A simple asynchronous API for sending mails from Vert.x applications
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<MailClient>static final StringThe name of the default pool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MailClientBuilderbuilder(io.vertx.rxjava3.core.Vertx vertx) Provide a builder forMailClient.io.reactivex.rxjava3.core.Completableclose()Close the MailClientstatic MailClientcreate(io.vertx.rxjava3.core.Vertx vertx, MailConfig config) Create a non shared instance of the mail client.static MailClientcreateShared(io.vertx.rxjava3.core.Vertx vertx, MailConfig config) LikecreateShared(io.vertx.rxjava3.core.Vertx, io.vertx.ext.mail.MailConfig, java.lang.String)but with the default pool namestatic MailClientcreateShared(io.vertx.rxjava3.core.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) io.reactivex.rxjava3.core.CompletablerxClose()Close the MailClientio.reactivex.rxjava3.core.Single<MailResult>rxSendMail(MailMessage email) send a single mail via MailClientio.reactivex.rxjava3.core.Single<MailResult>sendMail(MailMessage email) send a single mail via MailClienttoString()
-
Field Details
-
__TYPE_ARG
-
DEFAULT_POOL_NAME
The name of the default pool- See Also:
-
-
Constructor Details
-
MailClient
-
MailClient
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getDelegate
- Specified by:
getDelegatein interfaceRxDelegate
-
builder
Provide a builder forMailClient.It can be used to configure advanced settings like changing credentials with
MailClientBuilder.withCredentialsSupplier(java.util.function.Supplier<io.reactivex.rxjava3.core.Single<io.vertx.ext.auth.authentication.UsernamePasswordCredentials>>).- 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
public io.reactivex.rxjava3.core.Completable close()Close the MailClient- Returns:
-
rxClose
public io.reactivex.rxjava3.core.Completable rxClose()Close the MailClient- Returns:
-
newInstance
-