Registry / messaging / vertx-mail-client

vertx-mail-client

JSON →
library5.0.11javamavenunverified

Vert.x module for sending emails via SMTP server asynchronously.

<dependency> <groupId>io.vertx</groupId> <artifactId>vertx-mail-client</artifactId> <version>5.0.11</version> </dependency>
INSTALL
IMPORT
SIG · VERTX-MAIL-CLIENT
V
vertx-mail-client
messagingjavav5.0.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MailClient
io.vertx.ext.mail.MailClient

Send an email using Vert.x Mail Client asynchronously.

import io.vertx.core.Vertx; import io.vertx.ext.mail.MailClient; import io.vertx.ext.mail.MailMessage; public class Example { public static void main(String[] args) { Vertx vertx = Vertx.vertx(); MailClient client = MailClient.createNonShared(vertx, new MailConfig().setHostname("smtp.example.com")); MailMessage message = new MailMessage().setFrom("from@example.com").setTo("to@example.com").setSubject("Test").setText("Hello"); client.sendMessage(message, result -> { if (result.succeeded()) { System.out.println("Email sent"); } }); } }
Debug
Known issues
gotchaMailClient.createNonShared() creates a new client each call; use createShared() for connection pooling.
fix
Use MailClient.createShared(vertx, config) to reuse connections.
affects: >=5.0.0
Upgrade
Version history
5.0.11latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
24
OpenAI (training)
1
Resources
vertx-mail-client — mvn dependency:get vertx-mail-client · libregistry