Font in HTML mail

Using MailMessage email = new MailMessage();email.IsBodyHtml = true;

Can I set a font for a message?

Also, maybe it's a fad, but the p and br tags come out the same way for me? This is normal?

+3
source share
5 answers

You can use CSS:

<style>
   p {color:#999; font-family:arial;} /*grey*/
</style>

You are limited by what fonts are installed on the receiving machine.

+8
source

I would suggest exploring the use of a style sheet attribute to change the font size.

Not sure what you mean by "and tags come out the same for me" ... come out the same way as what?

... Charles beat me to her

+2
source

HTML .
,

  • CSS, <body>.
  • CSS.

HTML email-standards.org

+2

css . html, html .

+1

, break paragraph .

, . - .

css.

+1

Source: https://habr.com/ru/post/1703547/


All Articles