diff --git a/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/Mailers.java b/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/Mailers.java
index 4239dd46abaac..ce3b238a4f32e 100644
--- a/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/Mailers.java
+++ b/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/Mailers.java
@@ -128,7 +128,8 @@ public void stop() {
private MailClient createMailClient(Vertx vertx, MailerRuntimeConfig config, TlsConfig tlsConfig) {
io.vertx.ext.mail.MailConfig cfg = toVertxMailConfig(config, tlsConfig);
- return MailClient.createShared(vertx, cfg);
+ // Do not create a shared instance, as we want separated connection pool for each SMTP servers.
+ return MailClient.create(vertx, cfg);
}
private io.vertx.ext.mail.DKIMSignOptions toVertxDkimSignOptions(DkimSignOptionsConfig optionsConfig) {
diff --git a/integration-tests/virtual-threads/pom.xml b/integration-tests/virtual-threads/pom.xml
index 96fabdd34574b..f23f86a062baa 100644
--- a/integration-tests/virtual-threads/pom.xml
+++ b/integration-tests/virtual-threads/pom.xml
@@ -104,7 +104,7 @@
${maven.home}
- -Djdk.tracePinnedThreads -Dgradle.scan.captureTestLogging=false
+ --enable-preview -Djdk.tracePinnedThreads -Dgradle.scan.captureTestLogging=false
${skipTests}
@@ -131,6 +131,7 @@
${version.compiler.plugin}
+ --enable-preview
-parameters