# Automatically set category incoming email address based on slug

**URL:** https://meta.discourse.org/t/automatically-set-category-incoming-email-address-based-on-slug/57841
**Category:** Feature
**Created:** [February 23, 2017, 5:56pm UTC](https://meta.discourse.org/t/automatically-set-category-incoming-email-address-based-on-slug/57841 "2017-02-23T17:56:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [February 23, 2017, 5:56pm UTC](https://meta.discourse.org/t/automatically-set-category-incoming-email-address-based-on-slug/57841/1 "2017-02-23T17:56:35Z")

</div>

This is work I’ve just started doing in a plugin, but requires me to submit a PR to add a `DiscourseEvent.trigger` to the category model \*, so I wondered if the whole feature might have a place upstream.

\* I mean I could probably find a way to monkey patch it, but that’s never fun

> Proposal for standardised email-in addresses here: [Standardised emails-in proposal - Meta - Mozilla Discourse](https://discourse.mozilla-community.org/t/standardised-emails-in-proposal/13154)

> We want to automatically set this, rather than having to manually update each category’s address.

> This would probably take the form of a plugin, which updates everything on startup, hides the edit field, and runs whenever the slug or parent of a category changes.

> There would need to be a global setting, to set the domain of the email address, and the plugin would also need to run whenever this changes.

The feature would sit behind a site setting, and in addition to the settings specified in the plugin brief above, a setting to set the subslug divider would also make this more useful for everyone else. We’re going to be going with `.`, so addresses would be formed like:

`<slug>.<subslug>@discourse.mozilla.community`

_#pr-welcome?_

---

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [February 23, 2017, 6:09pm UTC](https://meta.discourse.org/t/automatically-set-category-incoming-email-address-based-on-slug/57841/2 "2017-02-23T18:09:31Z")

</div>

> [@LeoMcA](#):
>
> and runs whenever the slug or parent of a category changes.

And, as I’ve just realised while developing, it’ll have to run whenever the slug of a parent changes too.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [November 5, 2018, 4:23pm UTC](https://meta.discourse.org/t/automatically-set-category-incoming-email-address-based-on-slug/57841/3 "2018-11-05T16:23:19Z")

</div>

Hi Leo! How have you been keeping?

I’m curious - what was the outcome of this proposal? Did you implement it? I think it’s a terrific idea and could work well.

---

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [November 8, 2018, 2:08pm UTC](https://meta.discourse.org/t/automatically-set-category-incoming-email-address-based-on-slug/57841/4 "2018-11-08T14:08:29Z")

</div>

Not yet, the migration path headache (particularly around ensuring that users using the old email addresses they might have bounce in a nice way, or don’t bounce at all), and other priorities, made this effort stall.

It’s still on the todo list, just way down there. And if it’s not a feature the team want in core, it’ll work brilliantly as a self contained plugin.

I’ll be sure to update this topic when I do when I do _finally_ get round to doing it, but if it’s further up your priorities list and you wanted to contract someone to do it, I’d be more than happy to help them along with it.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [November 8, 2018, 7:24pm UTC](https://meta.discourse.org/t/automatically-set-category-incoming-email-address-based-on-slug/57841/5 "2018-11-08T19:24:44Z")

</div>

Thanks, Leo! I would definitely use this feature if it existed. 🚀

---

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [August 30, 2019, 6:06pm UTC](https://meta.discourse.org/t/automatically-set-category-incoming-email-address-based-on-slug/57841/6 "2019-08-30T18:06:29Z")

</div>

We’re finally getting ready to migrate our email-in setup, so I worked on this plugin:

> [@Automatically set category email-in addresses](https://meta.discourse.org/t/automatically-set-category-email-in-addresses/127237):
>
> This plugin takes 4 settings: auto\_email\_in\_enabled auto\_email\_in\_divider: Set the divider between a parent category slug and sub category slug auto\_email\_in\_domain: Set the domain of the email-in addresses auto\_email\_in\_append: Append new email-in addresses, rather than overwriting So with the default settings, when enabled, all category email-in addresses will be set to: \<slug\>@example.com or \<parent\_slug\>+\<child\_slug\>@example.com So, with a category under /c/help/faq, this would be hel…
