0

I'm using a twig template to generate the body of an email I'm gonna send.

I would like to set the font size bigger than normal, how can I do that?

My twig file: email.txt.twig is very simple:

{% if email == false %}
    {{ userName }} had made this poem just for you.
{% else %}
    {{ userName }} at {{ email }} had made this poem just for you.
{% endif %}

How to customize fonts?

1 Answer 1

0

If you want to send plaintext emails, that's not possible. Some email clients make text between stars (like *in this* example), but you can't really rely on that.

If you're okay with sending html emails (preferably as a multipart message, that includes the same content as plaintext for clients that do not support html emails), you can use basic html, but keep in mind that you'll need to use techniques that are usually frowned upon on the web, like the good ol' <font> tag.

2
  • Thanks multipart messages work just great. How come we can't use css rules in text/html messages?
    – fkoessler
    May 18, 2012 at 3:37
  • Because email clients (both web-based and desktop) don't support them. The situation is a lot worse than with websites and browsers, as there's a lot more mail clients out there.
    – Maerlyn
    May 18, 2012 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.