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

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/

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

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

<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.

3 Likes

thanks Eli :smiley:

@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?

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

1 Like

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?

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

1 Like

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.

1 Like

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?

This should work:

2 Likes

can we define the email text direction with this? we have major problems with RTL language that is reported here. If its possible, can you give us a hint?

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

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

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?

1 Like

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.

2 Likes