Change the Font Type in Zammad E-Mails

Infos:

  • Used Zammad version: 3.1
  • Used Zammad installation source: Package
  • Operating system: Ubuntu 16.04
  • Browser + version: Chrome 75.0.3770.142

Hello lovely Community of Zammad,

my name is Thomas. My Company and I have been working with Zammad since v2.4.

We have a problem regarding the font size and type in the e-mails of Zammad. Our company has a restriction of corporate design for the e-mails. In Outlook 2013 and above the font type is set to Arial 12px. Outlook 2010 is using Sans-Serif 12px. I want the font and the size to have a set standard of Arial 10 px.
The font and size in the ticket system itself is ok and doesn’t need to be changed.
Is there a way to set the global setting for the e-mails to Arial 10px?

Hello,

You can change in:
/opt/zammad/app/views/mailer/application_wrapper.html.erb

from:

body {
    ###html_email_css_font###;
}

to:

body {
font-family:Arial,Helvetica,sans-serif;font-size:11.0pt;
}

And below:
from:

<body style="###html_email_css_font###">###html###</body>

to:

<body style=font-family:Arial,Helvetica,sans-serif;font-size:11.0pt;>###html###</body>
1 Like

Hi @Thomas - welcome to the community! There is actually an advanced setting without a UI for it that enables this functionality. Just open the Zammad rails console and run Setting.get('html_email_css_font') to get the current default value and Setting.set('html_email_css_font', "font-family: ....") to change it.

The changes proposed by @YosefAdPro would work too but are not update save and overwritten the next time you update your Zammad. Anyway, huge thanks to you @YosefAdPro for helping people out! Maybe you can profit from the html_email_css_font Setting as well :crossed_fingers:

1 Like

i’ve got the same problem…
We have a fresh install of Zammad 3.1 on a ubuntu 18.04

i can’t fix the fonttype and size.
When i start
root@SRVXXX: zammad run rails c
if’ve got the prompt irb(main):002:0>

I think it will be wrong. After typing Setting.get… it shown like this
image

it would be right, but the outgoing E-Mails are even in Times New Roman :unamused:

With which E-Mail-Client are you checking the Font?
If your answer is Outlook: Outlook tends to be a Diva in those regards and might need fiddling.

If wanted, you can provide a sample eml which doesn’t show any affect so we can check if everything is fine.

With Outlook your are right.
We tested everything as a Docker container with version 2.9.0 and we solved it that way. Outlook had no problems with the e-mails sent over it.
In Outlook 2013, there is no way to export an eml file.
When I click Show source in Outlook it actually looks right …
https://rs.bendergruppe.com:5001/d/f/502682065504878395

and as html like this
https://rs.bendergruppe.com:5001/d/f/502682124116082580

Thanks to @YosefAdPro and @thorsteneckel that helped me a lot. I have search for hours with this problem.

1 Like

@MrGeneration - we should consider putting it in the admin documentation :thinking: seems like a common use case.

Done within system administrator docs:
https://docs.zammad.org/en/latest/console/hidden-settings.html#change-font-settings-for-outgoing-html-mails

1 Like

I found the mistake and a workaround for us.
In the header and in the body was always a symicolon too much.
body {body
font-family: Arial; font-size: 14.5px ;;
}
Now after I have used Setting.set (‘html_email_css_font’, ‘font-family: Arial; font-size: 14.5px’), so no extra symicolon behind the font-size: 14.5px, the correct font and size is also displayed in Outlook.

3 Likes

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.