# Enabling Mailgun Tags

**URL:** <https://meta.discourse.org/t/enabling-mailgun-tags/197049>\
**Category:** Support\
**Created:** [July 13, 2021, 10:49pm UTC](https://meta.discourse.org/t/enabling-mailgun-tags/197049 "2021-07-13T22:49:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)\
**Post date:** [July 13, 2021, 10:49pm UTC](https://meta.discourse.org/t/enabling-mailgun-tags/197049/1 "2021-07-13T22:49:07Z")

</div>

Does anyone know if there is a way to set up Mailgun tags so that the email types show up in Mailgun as tags?

From [this page](https://documentation.mailgun.com/en/latest/user_manual.html#sending-via-smtp), it looks like tags can be sent with an `X-Mailgun-Tag` header when using SMTP.

I think Mandrill was showing the email types, but that was 3 email providers ago and I don’t remember how it was set up. (Mandrill, SES, and Sendgrid all had issues and didn’t work out.)

These are the email types I’m referring to:

 ![Discourse email types](https://global.discourse-cdn.com/meta/original/3X/8/3/831d16872effbbe727ce0095752eef279d975da6.png)

**Edit:** manually adding `X-Mailgun-Tag: discourse_test` to the ` email custom headers` worked. I’m trying to get it to dynamically add the email type like in these examples:

- `X-Mailgun-Tag: user_posted`
- `X-Mailgun-Tag: digest`
- `X-Mailgun-Tag: user_private_message`
- etc.

---

<div class="post-metadata">

**Author:** ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)\
**Post date:** [July 27, 2021, 2:46am UTC](https://meta.discourse.org/t/enabling-mailgun-tags/197049/2 "2021-07-27T02:46:02Z")

</div>

If it isn’t possible to do it with a setting, is there a way to use the plugin system to add the email types to the Mailgun tags?
