?
Solved

HTML mail

Posted on 2011-09-08
4
Medium Priority
?
196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 17

Accepted Solution

by:
OmniUnlimited earned 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to count occurrences of each item in an array.
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…
Suggested Courses

764 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