# 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:** [23.Февраль.2017 17:56:35 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:** 1\
**Showing post:** 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:** [23.Февраль.2017 17:56:35 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?_

---

_[View the full topic](https://meta.discourse.org/t/automatically-set-category-incoming-email-address-based-on-slug/57841)._
