# If I want to change font in the emails, is it related to discourse or the mail service?

**URL:** https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323
**Category:** Support
**Created:** [29. Juni 2017 um 09:55 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323 "2017-06-29T09:55:28Z")
**Posts on this page:** 16
**Page:** 1

<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: [29. Juni 2017 um 09:55 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/1 "2017-06-29T09:55:28Z")

</div>

we have a Persian forum, all the emails are sent in an Arabic font.

to change the font to a Persian one, which is much more beautiful, can I use some html-css styling for mailgun (our email service)? like this one: [http://blog.mailgun.com/transactional-html-email-templates/](http://blog.mailgun.com/transactional-html-email-templates/)

is the font of the email changeable? It seems to me that the emails are sent directly from discourse forum and not mailgun. is it so?

just to give some insights about how beautiful it may be after changing the font or adding some style, please look at the two emails below: the left one sent from the forum directly and the other used an html format (it is a campaign and doesn’t have any invitation key):

 ![](https://global.discourse-cdn.com/meta/original/3X/b/5/b5e99609ec0ea5ce9c9e400744d3474d80aa780c.png)

---

<div class="post-metadata">

### Author: ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)
#### Post date: [29. Juni 2017 um 20:24 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/2 "2017-06-29T20:24:43Z")

</div>

Pretty sure that’s in `app/views/user_notifications/digest.html.erb`. Certainly the digests I get from [padpors.com](http://padpors.com) are filled with things like (excerpt still in quoted-printable mail format):

```plaintext
<table dir=3D"rtl" style=3D"width:100%;background:#f3f3f3;padding:0;borde=
r-spacing:0;font-family:Helvetica,Arial,sans-serif;font-size:14px;font-we=
ight:200;line-height:1.3;vertical-align:top;">

```

Which is remarkably similar, except for the `dir="rtl"`, to the lines in `digest.html.erb`. Fix the `font-family` usage in your copy of the file, like you did for the RTL fix.

---

<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. Juni 2017 um 07:00 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/3 "2017-06-30T07:00:08Z")

</div>

thanks Eli 😃

@hnaseri do you think the same font family as the website can be added to the files you change (just like `rtl` direction) and as a global change to rtl forums, or should it be done for each forum separately?

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [30. Juni 2017 um 07:05 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/4 "2017-06-30T07:05:42Z")

</div>

Unless we have a site settings for font family, I think its not possible.

---

<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. Juni 2017 um 08:33 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/5 "2017-06-30T08:33:55Z")

</div>

the font family can already be set through the admin customize panel, so somehow a site has already a font-family setting. doesn’t it?

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [30. Juni 2017 um 08:53 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/6 "2017-06-30T08:53:41Z")

</div>

Its not a site setting. Its custom css. And I’m not sure if we have access to css in html.erb files.

---

<div class="post-metadata">

### Author: ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)
#### Post date: [30. Juni 2017 um 14:33 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/7 "2017-06-30T14:33:28Z")

</div>

I’m not up-to-date on HTML in email, so I don’t know how well just linking the CSS file in would work. You can certainly change the name of the default `font-family`, though. And that will probably help a lot. Just make sure to change it everywhere in the file.

---

<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. Juni 2017 um 15:21 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/8 "2017-06-30T15:21:00Z")

</div>

thanks but is this customization via the admin panel or should it happen in the source code?

if it’s the second case, it seems that a setting is needed via the admin panel for the font-family, and only after that change the `erb` file can be tuned. otherwise how may one call the digest template in the admin customize panel?

---

<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: [30. Juni 2017 um 15:34 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/9 "2017-06-30T15:34:11Z")

</div>

This should work:

> [@Can I customize the email 'container' html too?](https://meta.discourse.org/t/can-i-customize-the-email-container-html-too/52297/8):
>
> 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: \<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: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [30. Juni 2017 um 16:20 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/10 "2017-06-30T16:20:16Z")

</div>

can we define the email text direction with this? we have major problems with RTL language that is reported [here](https://meta.discourse.org/t/changing-direction-of-invititaion-email-templates-for-rtl-languages/65203/). If its possible, can you give us a hint?

---

<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: [30. Juni 2017 um 16:23 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/11 "2017-06-30T16:23:57Z")

</div>

I have no experience with RTL, but I recommend trying to add the necessary CSS there and test to see if it works.

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [30. Juni 2017 um 16:26 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/12 "2017-06-30T16:26:05Z")

</div>

Can you show us what template is used to create those emails? invitation, etc. I can fix it if I find them.

---

<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: [1. Juli 2017 um 08:59 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/13 "2017-07-01T08:59:20Z")

</div>

thanks for the link, I tried it and it only works for the digest and notification emails. but the 4 invitation email templates (invite to the forum and to a topic, with or without personal message) are not controlled with that string.

is it possible to also request for a feature which connects these 4 emails to that header-string as well?

---

<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: [24. Juni 2019 um 08:09 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/14 "2019-06-24T08:09:40Z")

</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: [24. Juni 2019 um 09:25 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/15 "2019-06-24T09:25:32Z")

</div>

Have we given any more thought to templating emails so they can be styled a bit more @awesomerobot? Changing font seems like a reasonable ask.

---

<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: [9. Dezember 2022 um 00:43 UTC](https://meta.discourse.org/t/if-i-want-to-change-font-in-the-emails-is-it-related-to-discourse-or-the-mail-service/65323/16 "2022-12-09T00:43:40Z")

</div>


