Automatically set category incoming email address based on slug

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: 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?

3 Likes

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

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.

1 Like

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.

3 Likes

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

1 Like

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

4 Likes