Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

HTML mail

Posted on 2011-09-08
4
Medium Priority
?
198 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

636 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