Incoming email with reply-to header not honored


When a user reply in discourse to a message coming from an email with a reply-to header, it seems that the outgoing email is sent to the from email address and not the one in reply-to header.

Is it expected to work like this ?

Note: We have a Wordpress web site using a contact form. We would like to receive the message into discourse and be able to reply directly within discourse.

1 Like

I think that is expected. Have you added a form to your website that users can add their email address to? If I’m understanding what you are trying to do, it would be risky to assume that users are entering the correct email address into the form.


The contact form seems to work has expected.

Here is an example

  1. The form content :

  2. The message received by email :

Received: from 3.XXX_HOST_1 (Unknown [])
   by 7beca71408ba (Haraka/2.8.25) with ESMTP id EA5F3683-54AD-422E-97D5-9CB6A8AEB16E.1
   envelope-from <>;
   Wed, 02 Sep 2020 05:46:26 +0000
Received: from YYY_HOST_2 (unknown [])
   by XXX_HOST_1 (Postfix) with ESMTP id 08F161D735F
   for <>; Wed,  2 Sep 2020 07:46:25 +0200 (CEST)
Received: from YYY_HOST_2 (localhost.localdomain [])
   by YYY_HOST_2 (Postfix) with ESMTP id DE3374E006D
   for <>; Wed,  2 Sep 2020 07:46:25 +0200 (CEST)
Received: from ZZZ_HOST_3 (gwc.ZZZ_HOST_3
by YYY_HOST_2 (Postfix) with ESMTP id
for <>; Wed,  2 Sep 2020 07:46:25 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [])
by localhost.domain.tld (Postfix) with ESMTP id 2BB755FAD6
for <>; Wed,  2 Sep 2020 07:46:25 +0200 (CEST)
Received: by ZZZ_HOST_3 (Postfix, from userid 868681)
id 01D9A5FADA; Wed,  2 Sep 2020 07:46:24 +0200 (CEST)
Subject: =?UTF-8?Q?Message_envoy=C3=A9_depuis_le_site_Apel_Sophie_Bar?=
Date: Wed, 2 Sep 2020 05:46:24 +0000
From: User using the contact form <>
Message-ID: <>
X-Mailer: PHPMailer 6.1.6 (
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 3580643179988386017

De : User using the contact form <>
Destinataire : essai_temp <>

Corps du message :
This is my message

Cet e-mail a été envoyé via le formulaire de contact de MY_SITE (

Here is the result

Note: pay attention to those fields :

From: User using the contact form <>

In discourse, responding to the message will send an email to and not

But if I change my form to send the email to my gmail account and I reply to the email, the response will be send to has expected.

If Discourse used the reply-to address that would effectively enable impersonation for any category or group inbox which had a public email address.

It’s probably right that this doesn’t work the way you’re hoping by default.

I realize that it would be less straightforward from the user’s point of view, but you could use a mailto link on your website to open the user’s default mail program. That way the email would be sent from the user’s email address.

If users are able to login to your website and you have some way of associating your website’s users with Discourse users (for example, checking that the emails match), you could add a form to your website that would allow logged in users to post to Discourse via the Discourse API.

1 Like