From af6d9eb83287ac84d3fc2505da1876084e3ac0e7 Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Thu, 19 Oct 2023 11:34:25 +0200 Subject: [PATCH] Fix the mailer connection pool when multiple mailers are used Fix https://github.com/quarkusio/quarkus/issues/36567 --- .../src/main/java/io/quarkus/mailer/runtime/Mailers.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 4239dd46abaac5..ce3b238a4f32ed 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) {