Solved

HTML mail

Posted on 2011-09-08
4
189 Views
Last Modified: 2012-05-12
I am dynamically creating an email using php mail function & sending as html mail.

I want to cause the email text font to be 14pt Arial Bold.

Do I have to specify the font for every email line or is there a way to apply a "style" to the whole email?

Thanks

(PS - I can send php script source if needed)
0
Comment
Question by:Richard Korts
4 Comments
 
LVL 17

Accepted Solution

by:
OmniUnlimited earned 500 total points
Comment Utility
You might get some disagreement with me on this, but it has been my experience that you cannot assume anything with HTML email.  It definitely does not behave as you would expect a web page to do.  So, my advice, would be that if you want to be absolutely sure the recipient sees what you want them to see, specify CSS individually for every element you have.
0
 

Author Comment

by:Richard Korts
Comment Utility
To OmniUnlimited:

That's what I was AFRAID of.

I'll see if any others say otherwise, I've been told basically what you said before.
0
 
LVL 30

Expert Comment

by:LZ1
Comment Utility
HTML email is a completely different monster when compared to HTML sites. The traditional terms of CSS, HTML, form and function no longer apply. You use tables on top of tables, next to tables, inside of tables, etc. Inline styles rule and always assume that nothing is supported in the way of CSS.

OmniUnlimited is correct. You'll need to use inline styles all over your file in order to get it to display how you want it. Generally images, are much more widely accepted when it comes to email clients.
0
 
LVL 17

Expert Comment

by:nanharbison
Comment Utility
The last time I used html in an email, it  was like html coding from the 1990's. You need inline styles, like below. You can always test it out by sending it to yourself.

<font face="arial" color="black" size ="14pt"><b>words here</b></font>

Open in new window

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now