public class MailClient extends Object implements io.vertx.lang.rx.RxDelegate
A simple asynchronous API for sending mails from Vert.x applications
NOTE: This class has been automatically generated from theoriginal non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static io.vertx.lang.rx.TypeArg<MailClient> |
__TYPE_ARG |
static String |
DEFAULT_POOL_NAME
The name of the default pool
|
| Constructor and Description |
|---|
MailClient(MailClient delegate) |
MailClient(Object delegate) |
| Modifier and Type | Method and Description |
|---|---|
static MailClientBuilder |
builder(Vertx vertx)
Provide a builder for
MailClient. |
void |
close()
Close the MailClient
|
void |
close(Handler<AsyncResult<Void>> closedHandler)
Close the MailClient
|
static MailClient |
create(Vertx vertx,
MailConfig config)
Create a non shared instance of the mail client.
|
static MailClient |
createShared(Vertx vertx,
MailConfig config)
Like
createShared(io.vertx.reactivex.core.Vertx, io.vertx.ext.mail.MailConfig, java.lang.String) but with the default pool name |
static MailClient |
createShared(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 name
|
boolean |
equals(Object o) |
MailClient |
getDelegate() |
int |
hashCode() |
static MailClient |
newInstance(MailClient arg) |
Completable |
rxClose()
Close the MailClient
|
Single<MailResult> |
rxSendMail(MailMessage email)
send a single mail via MailClient
|
MailClient |
sendMail(MailMessage email)
send a single mail via MailClient
|
MailClient |
sendMail(MailMessage email,
Handler<AsyncResult<MailResult>> resultHandler)
send a single mail via MailClient
|
String |
toString() |
public static final io.vertx.lang.rx.TypeArg<MailClient> __TYPE_ARG
public static final String DEFAULT_POOL_NAME
public MailClient(MailClient delegate)
public MailClient(Object delegate)
public MailClient getDelegate()
getDelegate in interface io.vertx.lang.rx.RxDelegatepublic static MailClientBuilder builder(Vertx vertx)
MailClient.
It can be used to configure advanced settings like changing credentials with MailClientBuilder.withCredentialsSupplier(java.util.function.Supplier<io.vertx.core.Future<io.vertx.ext.auth.authentication.UsernamePasswordCredentials>>).
vertx - public static MailClient create(Vertx vertx, MailConfig config)
vertx - the Vertx instance the operation will be run inconfig - MailConfig configuration to be used for sending mailspublic static MailClient createShared(Vertx vertx, MailConfig config, String poolName)
vertx - the Vert.x instanceconfig - the configurationpoolName - the pool namepublic static MailClient createShared(Vertx vertx, MailConfig config)
createShared(io.vertx.reactivex.core.Vertx, io.vertx.ext.mail.MailConfig, java.lang.String) but with the default pool namevertx - the Vert.x instanceconfig - the configurationpublic MailClient 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)public MailClient sendMail(MailMessage email)
email - MailMessage object containing the mail text, from/to, attachments etcpublic Single<MailResult> rxSendMail(MailMessage email)
email - MailMessage object containing the mail text, from/to, attachments etcpublic void close(Handler<AsyncResult<Void>> closedHandler)
closedHandler - will be called after it is closed.public void close()
public Completable rxClose()
public static MailClient newInstance(MailClient arg)
Copyright © 2025 Eclipse. All rights reserved.