Solved

HTML mail

Posted on 2011-09-08
4
195 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 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
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…

726 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