Solved

HTML mail

Posted on 2011-09-08
4
191 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
ID: 36504108
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
ID: 36504233
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
ID: 36504252
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
ID: 36507143
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

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