# Can I customize the email 'container' html too?

**URL:** https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297
**Category:** Support
**Created:** [01.Ноябрь.2016 12:26:42 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297 "2016-11-01T12:26:42Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [01.Ноябрь.2016 12:26:42 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/1 "2016-11-01T12:26:42Z")

</div>

Hi,

I’d like to update the layout of the emails to match the other emails that we send. What I’d need is a way to add a ‘wrapper’ around the email content, adding a logo, text-box and some elements like that. I couldn’t find this option in the Customize section of the admin - how would I do this?

Thanks!

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [04.Ноябрь.2016 10:01:39 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/2 "2016-11-04T10:01:39Z")

</div>

Hi folks,

when re-reading this I realised that I could have been more clear with my request for help. Let me try again 🙂

I’m aware that you can customise the text content of the emails, but I’d like to have a little more control over their layout. I’ve gone through all the admin options, thinking that maybe there’s an ‘email HTML template’ setting somewhere, but I haven’t been able to find it. Does such a thing exist and did I simply overlook it? Or would this require some custom coding/plugin?

Many thanks!

---

<div class="post-metadata">

### Author: ![Hank\_Pantier1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hank_pantier1/32/121396_2.png) [@Hank\_Pantier1](https://meta.discourse.org/u/Hank_Pantier1)
#### Post date: [28.Ноябрь.2016 18:58:29 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/3 "2016-11-28T18:58:29Z")

</div>

any followup on this? i would like to do the same thing…

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [28.Ноябрь.2016 19:27:51 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/4 "2016-11-28T19:27:51Z")

</div>

Today our email only allows the customizations trough outlets, and not the concept of containers.

Maybe if you open the div with the customizations in a header outlet, and close in a footer outlet it can work, and be generic enough to help many users.

What do you think?

---

<div class="post-metadata">

### Author: ![Hank\_Pantier1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hank_pantier1/32/121396_2.png) [@Hank\_Pantier1](https://meta.discourse.org/u/Hank_Pantier1)
#### Post date: [28.Ноябрь.2016 20:20:12 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/5 "2016-11-28T20:20:12Z")

</div>

what are outlets? where can i modify them?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [28.Ноябрь.2016 20:29:40 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/6 "2016-11-28T20:29:40Z")

</div>

> [@Adding custom content to summary emails](https://meta.discourse.org/t/adding-custom-content-to-summary-emails/49103):
>
> Today I added a way to insert custom html and text to digest/summary emails. In the past, only the colour scheme could be customized. Now you can insert arbitrary html using the Admin \> Appearance \> Site Texts interface and searching for “digest.custom”. Narrow it down to the html emails with “digest.custom.html”. Setting the header field will replace the default header, which is currently your site’s logo on the left side. The rest of the fields can be used to insert banner ads, spe…

---

<div class="post-metadata">

### Author: ![Hank\_Pantier1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hank_pantier1/32/121396_2.png) [@Hank\_Pantier1](https://meta.discourse.org/u/Hank_Pantier1)
#### Post date: [28.Ноябрь.2016 20:40:02 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/7 "2016-11-28T20:40:02Z")

</div>

gotcha - i am looking for a way to customize ALL emails with our branding…

---

<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: [28.Ноябрь.2016 21:23:32 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/8 "2016-11-28T21:23:32Z")

</div>

There’s a string with id **user\_notifications.header\_instructions** that can be used to add some html to the top of all HTML emails. It can be customized from Admin \> Customize \> Text Content. Here’s a simple example that would display a centered image (like a logo) with a red line above the email’s content:

```plaintext
<p style="text-align: center; border-bottom: 2px solid #B90B26; padding-bottom: 15px; text-align:center;">
<img src="...absolute-url-to-an-image..." width="90" height="66">
</p>

```

---

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [30.Июнь.2017 19:04:02 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/9 "2017-06-30T19:04:02Z")

</div>

🤔 to test how this works, I added the same lines as above with the absolute url to our logo, to this text content:

> [@neil](#):
>
> user\_notifications.header\_instructions

but nothing happened for our invitation emails,

- is any additional work needed?
- does this still work?

p.s.:

1. the logo was already in digest emails (only digest), without any input in this text area.
2. it works for the digest, if I put the html lines in this string: `user_notifications.digest.custom.html.header`
3. the above text doesn’t work for the invitation emails. but it works for simple notifs.

* * *

**update:**

can I customize font of the email, using this way?

although fonts in the preview digest has been changed using the uploaded font, in the email, it hasn’t been changed.

also for notifications (and not digest) the codes are shown in the email!

I’ve used this code lines in the header:

```plaintext
<style type="text/css" media="screen, print">

    @font-face {
      font-family: "sans";
      src: url("absolute url to font address on our server");

    }
    
  body, body input, body select, body textarea, body button, p, a, strong, center, h6{
    font-family: "sans";}
    
  </style>

<p style="text-align: center; border-bottom: 2px solid #0071BC; padding-bottom: 15px; text-align:center;">
<img src="absolute url to the logo">
</p>

```

---

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [16.Июль.2017 07:55:22 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/10 "2017-07-16T07:55:22Z")

</div>

sorry to bring this up, but my question again:

can one change the font of an email, by adding an html code in the text content?

It seems to work for the digest when I check the digest preview, but in the email inbox, the font is still not uploaded to the digest.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [29.Июнь.2019 20:12:12 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/11 "2019-06-29T20:12:12Z")

</div>



---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [29.Июнь.2019 20:33:56 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/12 "2019-06-29T20:33:56Z")

</div>

@awesomerobot составляет план по улучшению тематизации электронной почты в выпуске 2.4.

---

<div class="post-metadata">

### Author: ![surety](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/surety/32/156849_2.png) [@surety](https://meta.discourse.org/u/surety)
#### Post date: [16.Август.2019 13:16:12 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/13 "2019-08-16T13:16:12Z")

</div>

@codinghorror @awesomerobot, вы всё ещё планируете включить тематическое оформление писем в версии 2.4? Я не вижу этого в теме [выпуска 2.4](https://meta.discourse.org/t/discourse-version-2-4/108194).

Мы как раз переезжаем с bbpress на Discourse. Я предполагал, что письма можно стилизовать, но только что узнал, что это невозможно. Очень надеюсь увидеть эту функцию в версии 2.4…

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [16.Август.2019 15:54:05 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/14 "2019-08-16T15:54:05Z")

</div>

Да, @neil совсем недавно внедрил возможность настройки HTML/CSS, используемых в наших письмах. Если вы находитесь на ветке tests-passed и обновляли систему в течение последней недели или около того, эта функция доступна по пути `admin > customize > email style`

---

<div class="post-metadata">

### Author: ![surety](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/surety/32/156849_2.png) [@surety](https://meta.discourse.org/u/surety)
#### Post date: [16.Август.2019 17:18:57 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/15 "2019-08-16T17:18:57Z")

</div>

Отлично! Спасибо. Мы, скорее всего, подождём выхода версии 2.4, чтобы попробовать её, так как у нас сейчас много работы по миграции всего на версию 2.3.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [01.Март.2023 07:25:32 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/16 "2023-03-01T07:25:32Z")

</div>



---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [29.Апрель.2023 15:59:42 UTC](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/17 "2023-04-29T15:59:42Z")

</div>


