Enabling Mailgun Tags

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

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.

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?