# Reply by email address broken

**URL:** https://meta.discourse.org/t/reply-by-email-address-broken/229465
**Category:** Bug
**Created:** [June 9, 2022, 12:55am UTC](https://meta.discourse.org/t/reply-by-email-address-broken/229465 "2022-06-09T00:55:12Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [June 9, 2022, 12:55am UTC](https://meta.discourse.org/t/reply-by-email-address-broken/229465/1 "2022-06-09T00:55:12Z")

</div>

Build 2.9.0.beta4 ([82ac698d4f](https://github.com/discourse/discourse/commits/82ac698d4fe4f0b1ed22d06ec96700880bb6d8d7))

In the _Admin → Settings → Email_ page

Discourse ignores the `Reply by email address` if the email address does not contain _%{reply\_key}_ and instead will use the default email address in the to and reply-to headers of the emails it sends out.

Here are the steps to replicate the issue and also what works:

# BROKEN

Assuming the default email address set in discourse is _[forum@domain.com](mailto:forum@domain.com)_

- `reply by email enabled` → checked
- `reply by email address` → [community.forum@domain.com](mailto:community.forum@domain.com)

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/8/5/f85f4811e09a7fea128c0faae48f44efbeee1ff6.png)

When discourse sends emails, the from and the reply-to headers contain _[forum@domain.com](mailto:forum@domain.com)_ instead of _[community.forum@domain.com](mailto:community.forum@domain.com)_

* * *

# WORKING

However, if I add _%{reply\_key}_ to the `reply by email address`:

- `reply by email address` → community.forum+%{reply\_key}@domain.com

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/e/7/de795fdb3409f19d797899b759a8d6e3489d4db2.png)

This works as expected and the email now comes from _community.forum+\<id\>@domain.com_ with the reply-to header also set correclty.

---

_[View the full topic](https://meta.discourse.org/t/reply-by-email-address-broken/229465)._
