0

I'm sending an automatic html email from my website. In my email I set some text to red color and the font to a certain font type. When I view the html email from yahoo mail, The red color is applied, but the font is not applied. Why is it?

Also, when I try to view the html source code of the yahoo mail web page, I cannot find my html email content on this html source code. why is it?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<h2 style="color: #CC0000; text-align: center;">
    Welcome to the Dave&#39;s Photo Album</h2>
<p>
    Hi <%UserName%>,</p>
<p>
    Thanks for registering. Here is your new user name and password:</p>
<p>
    User Name: <%UserName%>
</p>
<p>
    Password: <%Password%>
</p>
<p>
    Enjoy!
</p>

0

3 Answers 3

2

You can use css inline only, and from my experience you need to do it with tables, since not all email services (none maybe) understand divs that well, I also recommend to stay within 600 px wide for the template, since its usually displayed in "panes" like yahoo mail, gmail, outlook etc. there's a lot of material you can check over at this page:

http://www.campaignmonitor.com/css/

there's no html, body or title declaration, just start with <table></table> like if was your body.

outlook 2007 will probably be the one with the most restraints.

good luck

Sign up to request clarification or add additional context in comments.

Comments

2

In css, you can use font or font-family to change the font. I don't see anything that would actually change the font in your code there!

http://www.w3schools.com/css/css_font.asp

1 Comment

Hi Stack Overflow's code display method is very clumsy and it has eaten half of the html code I posted
1

Don't send email in HTML. It is much more likely to be flagged as spam if you do.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.