1

The text in the outgoing emails from my app is plain non-proportional text.

I tried to make it Arial. But it is still not Arial.

Here is what I send to SendGrid, which sends the email:

<p><font face="Arial"><pre>Message</pre></font></p>
Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Doug Null
  • 7,989
  • 15
  • 69
  • 148

1 Answers1

4

The problem is using these two:

  • <font>
  • <pre>

Replace it with the following:

<p style="font-family: Arial; white-space: pre-wrap;">Message</p>

The <pre> changes the font family here. And the <font> is deprecated.

The style attribute will be a replacement for the following:

  • <font> => font-family: Arial;
  • <pre> => white-space: pre-wrap;
Soolie
  • 1,812
  • 9
  • 21
  • **More info:** You enclosed the `Message` inside `
    `, which imposes `monospace` fonts. Let me know if this works for you.
    – Soolie Dec 08 '17 at 14:53
  • Thanks, Soolie! It worked. Plus, my hyperlinks (within 'message') still work too -- that's why I put in the
    – Doug Null Dec 08 '17 at 15:17