# How to change the style of the email template of the digest?

**URL:** <https://meta.discourse.org/t/how-to-change-the-style-of-the-email-template-of-the-digest/61653>\
**Category:** Development\
**Tags:** activity-summary\
**Created:** [26. April 2017 um 16:35 UTC](https://meta.discourse.org/t/how-to-change-the-style-of-the-email-template-of-the-digest/61653 "2017-04-26T16:35:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)\
**Post date:** [27. April 2017 um 20:04 UTC](https://meta.discourse.org/t/how-to-change-the-style-of-the-email-template-of-the-digest/61653/5 "2017-04-27T20:04:57Z")

</div>

The .erb template can’t be overridden by a plugin.

Car Talk has its own digest emails. How we did that in a plugin was to treat it as a new email entirely. You could disable Discourse’s default digest emails and then use your own. It’s more complicated than making a new template though…

- Create a new scheduled job in the plugin that is the same as [enqueue\_digest\_emails.rb](https://github.com/discourse/discourse/blob/master/app/jobs/scheduled/enqueue_digest_emails.rb) but will queue your new email. `Jobs.enqueue(:my_custom_digest_email, user_id: user_id)`
- Create your new mailer in `app/mailers`. Copy [the digest method from the user\_notifications.rb mailer](https://github.com/discourse/discourse/blob/master/app/mailers/user_notifications.rb#L99-L178) into your mailer.
- Put your new template for the email in `app/views/mailers/my_custom_digest_email`.

Not ideal, but gives you a lot of freedom to customize the data and logic.

---

_[View the full topic](https://meta.discourse.org/t/how-to-change-the-style-of-the-email-template-of-the-digest/61653)._
