Repository: quarkusio/quarkus
Issue: Mailer extension replyTo doesn't work

**Describe the bug**
If you call  `setReplyTo` in a `Mail` object, the `ReactiveMailerImpl` doesn't add the corresponding header.

**Expected behavior**
The `ReactiveMailerImpl ` should add the replyTo attribute of `Mail` to the corresponding `MailMessage`, allowing mail clients (such as Outlook or Gmail) to reply to the correct address.

**Actual behavior**
The header is not added, and replies are always sent to the sender (`Mail#from`).

**Additional context**
The issue is caused by the lack of a replyTo field in `io.vertx.ext.mail.MailMessage`.

As a temporary workaround you can set the reply-to as a header, calling  `Mail.addHeader("Reply-To", replyToAddress);` and it will work as expected.

For consistency, Quarkus Mailer sould either remove the attribute replyTo from the `Mail` class, or modify the `ReactiveMailerImpl` to add the field as a header (preferably the later).

Changed files:
extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/ReactiveMailerImpl.java
extensions/mailer/runtime/src/test/java/io/quarkus/mailer/runtime/MailerImplTest.java

diff --git a/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/ReactiveMailerImpl.java b/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/ReactiveMailerImpl.java
index 42e62ca9655..50eacf66a7b 100644
--- a/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/ReactiveMailerImpl.java
+++ b/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/ReactiveMailerImpl.java
@@ -73,7 +73,7 @@ public CompletionStage<Void> send(Mail... mails) {
 
     private CompletionStage<Void> send(Mail mail, MailMessage message) {
         if (mock) {
-            LOGGER.infof("Sending email {} from {} to {}, text body: \\n{}\\nhtml body: \\n{}",
+            LOGGER.infof("Sending email %s from %s to %s, text body: \\n%s\\nhtml body: \\n%s",
                     message.getSubject(), message.getFrom(), message.getTo(),
                     message.getText(), message.getHtml());
             return mockMailbox.send(mail);
@@ -98,7 +98,6 @@ private CompletionStage<MailMessage> toMailMessage(Mail mail) {
         } else {
             message.setFrom(this.from);
         }
-
         message.setTo(mail.getTo());
         message.setCc(mail.getCc());
         message.setBcc(mail.getBcc());
@@ -106,6 +105,9 @@ private CompletionStage<MailMessage> toMailMessage(Mail mail) {
         message.setText(mail.getText());
         message.setHtml(mail.getHtml());
         message.setHeaders(toMultimap(mail.getHeaders()));
+        if (mail.getReplyTo() != null) {
+            message.addHeader("Reply-To", mail.getReplyTo());
+        }
 
         List<CompletionStage<?>> stages = new ArrayList<>();
         List<MailAttachment> attachments = new CopyOnWriteArrayList<>();
diff --git a/extensions/mailer/runtime/src/test/java/io/quarkus/mailer/runtime/MailerImplTest.java b/extensions/mailer/runtime/src/test/java/io/quarkus/mailer/runtime/MailerImplTest.java
index 414c0d3402e..73f794af8c4 100644
--- a/extensions/mailer/runtime/src/test/java/io/quarkus/mailer/runtime/MailerImplTest.java
+++ b/extensions/mailer/runtime/src/test/java/io/quarkus/mailer/runtime/MailerImplTest.java
@@ -197,6 +197,18 @@ void testAttachments() throws MessagingException, IOException {
         assertThat(value).isEqualTo("Hello 2");
     }
 
+    @Test
+    void testReplyToHeaderIsSet() throws MessagingException {
+        mailer.send(Mail.withText(TO, "Test", "testHeaders")
+                .setReplyTo("reply-to@quarkus.io"))
+                .toCompletableFuture().join();
+        assertThat(wiser.getMessages()).hasSize(1);
+        WiserMessage actual = wiser.getMessages().get(0);
+        MimeMessage msg = actual.getMimeMessage();
+        assertThat(msg.getHeader("Reply-To")).containsExactly("reply-to@quarkus.io");
+        assertThat(msg.getReplyTo()).containsExactly(InternetAddress.parse("reply-to@quarkus.io"));
+    }
+
     private String getContent(WiserMessage msg) {
         try {
             return getTextFromMimeMultipart((MimeMultipart) msg.getMimeMessage().getContent());