943,552 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Apr 20th, 2007
0

Using CSS in email? Or alternative?

Expand Post »
I have a script sending out an email to some users, and I was going to try to use CSS to format it, until I found out it's nearly impossible. So I have 2 questions.

1. Is it possible to use CSS in email, and ensure everyone can read it? (This would be the best option)

2. If option #1 is not possible, i need a resource or some info somewhere to show me how to do some af the things that CSS can do, only in plane jane HTML. For instance, a bit of CSS might say:

HTML and CSS Syntax (Toggle Plain Text)
  1. font: 70%/1.5 Verdana, Tahoma, Arial, Helvetica, sans-serif;

But I can't quite get the same effect using plane HTML. I mean the font is easy enough, but I can't figure out how to get the font size the same. I guess I'm just really amature at HTML. Also changing the hover color on a text link. And changing the character spacing, so I can make the lettering a little closer.

Ok that's enough. I think you get the point. To be honest, I'm trying to "copy" a CSS template in an email I'm sending, but haven't been successful in using CSS in email.

Any suggestions would be helpful.
Reputation Points: 10
Solved Threads: 0
Posting Whiz in Training
nathanpacker is offline Offline
234 posts
since May 2005
Apr 23rd, 2007
0

Re: Using CSS in email? Or alternative?

I have a script sending out an email to some users, and I was going to try to use CSS to format it, until I found out it's nearly impossible. So I have 2 questions.

1. Is it possible to use CSS in email, and ensure everyone can read it? (This would be the best option)
No.

Many email systems (such as Pine) don't understand HTML or CSS. They will print your code in the body of the email, making the recipient mad.

Remember that many people don't have a choice of what email client they have to use. It is decided for them by bosses, universities, or ISPs. And some spam filters go "BLEAUGH!" when they see HTML, and throw the email in the spam box.

Quote ...
2. If option #1 is not possible, i need a resource or some info somewhere to show me how to do some af the things that CSS can do, only in plane jane HTML. For instance, a bit of CSS might say:

HTML and CSS Syntax (Toggle Plain Text)
  1. font: 70%/1.5 Verdana, Tahoma, Arial, Helvetica, sans-serif;

But I can't quite get the same effect using plane HTML. I mean the font is easy enough, but I can't figure out how to get the font size the same. I guess I'm just really amature at HTML. Also changing the hover color on a text link. And changing the character spacing, so I can make the lettering a little closer.
Please do not put HTML in emails either. As I said earlier, many spam filters go "BLEAUGH!" when they see HTML, and automatically throw the email in the spam box. And many email systems display your code as part of the text, making an illegible message. Your attempt at fontmaking would look like this to the user of an non-HTML emailor when the recipient opens his mail:

HTML and CSS Syntax (Toggle Plain Text)
  1. <span style="font: 70%/1.5 Verdana, Tahoma, Arial, Helvetica, sans-serif;">Hi Larry, how are you.</span>

When I get an email that looks like that, it goes in the recycling bin.

Caveat Emailor.

Email is not for nice formatting. Email is for sending letters to friends. And especially email is not for advertising. I love blasting spam advertising into oblivion with my DELETE button.

Keep emails to text and attachments.
Last edited by MidiMagic; Apr 23rd, 2007 at 1:20 am.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Apr 23rd, 2007
0

Re: Using CSS in email? Or alternative?

Thanks for the reply. Sounds like you have had some nasty experiences with HTML email. By the way, the email I'm sending is not an advertisement. It is in response to a form a user fills out on my site, with information they requested. I simply wanted to give it to them in a way that is nice and professional looking.

It can't be that uncommon. I Receive HTML-formatted emails all the time. In fact, Daniweb, which I consider to be the gem of information on this type of thing, sends HTML emails for everything, don't they? And besides, I tested most of the major email services that people use with my HTML email, Gmail, Hotmail, Yahoo, AOL, and they all seem to be taking it fine.

I think the only problem I would really have with HTML email would be users who specifically turn off HTML email, wouldn't it?

I appreciate your opinion. I have given up trying to us CSS in email. However, I would like to hear something encouraging about HTML email, as it seems to be used all the time, so it can't be that bad! (Plus, I think I've finally achieved the look I want without using CSS.) If I get enough opinions that HTML email is really that bad, I won't be completely opposed to going back to just a text email.

But I do have to say that this email will not be going to hundreds of people. The form will most likely be filled out by no more than one or two people a month, if that.
Last edited by nathanpacker; Apr 23rd, 2007 at 1:17 pm.
Reputation Points: 10
Solved Threads: 0
Posting Whiz in Training
nathanpacker is offline Offline
234 posts
since May 2005
Apr 24th, 2007
0

Re: Using CSS in email? Or alternative?

It's not bad, if you can get it to render legibly on non-html systems. Minimize tag use.

My experience has been the following:

- Most UNIX and VMS email systems (e.g. Pine) don't parse the HTML. They display the code as text. Most unix terminals use monospace fonts. This includes ALL systems which are connected to in a Telnet-type environemnt.

- Many institutions (including colleges) take administrator privileges away from users, and do one of the following to emails containing HTML:
- Turn off HTML parsing (you see the HTML as text)
- Render the page as plain text by sstripping all tags out of the code. But you see the & codes instead of the characters they make.
- Throw emails containing HTML into spam boxes.
- Throw the HTML email away entirely, often without notifying the user that he didn't get it.

They do this to prevent malicious software from getting into their systems.

- Some system-wide firewalls strip HTML code out of the incoming email data stream, leaving plain text.

- Some legacy browsers (such as Lynx, used on DOS systems), and emailers render only a few tags. The other tags are just deleted from the text without formatting it. Fonts are meaningless on such browsers, since they use the CGA text screen.
Last edited by MidiMagic; Apr 24th, 2007 at 4:27 am.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Apr 24th, 2007
0

Re: Using CSS in email? Or alternative?

Well thanks for the info. Now I don't know what to do. I had this nice email all set up, and I don't want to go back to text. I guess I might, but really, this email will go to no more than 1 or 2 people a month. Man, now you got me thinking about going back to plain text. 2nd opinions anyone?
Reputation Points: 10
Solved Threads: 0
Posting Whiz in Training
nathanpacker is offline Offline
234 posts
since May 2005
Apr 26th, 2007
0

Re: Using CSS in email? Or alternative?

Find out what email systems your clients have.

Send different emails to clients with different systems.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Apr 26th, 2007
0

Re: Using CSS in email? Or alternative?

Yeah, outlooks secuorty settings hate html emails too
Moderator
Featured Poster
Reputation Points: 1764
Solved Threads: 574
Moderator
jbennet is offline Offline
16,485 posts
since Apr 2005
Apr 26th, 2007
0

Re: Using CSS in email? Or alternative?

Click to Expand / Collapse  Quote originally posted by MidiMagic ...
Find out what email systems your clients have.

Send different emails to clients with different systems.
Lol, well there aren't really any "clients" per se. Theoretically, the person filling out the form can be anyone in the world, so I can in no way predict or find out what systems most people will be using. I have however put a little something in my code to tell me the end users Browser and OS info. But that can only give me small clues about their email usage. But anyway like I said, the numbers of people filling out this form will be very low, a couple a month at most.

And about Outlook, there are options to choose whether or not to read HTML, and I'm pretty sure by default, Outlook is set to read emails as HTML, not plain text. I've just recently installed it on my pc, and didn't make any changes in the settings, and it is set to read HTML, and the HTML renders fine.

But apparently you all are very opposed to HTML email. I appreciate the opinions. I'm just wondering why then I get so many HTML emails every day from reputable organizations like Buy.com, TigerDirect, eBay, and DANIWEB. Surely their emails are being ready by MANY more recipients than mine, and are being farely successful, right?

That is my biggest question. Daniweb sends out HTML emails for all it's thread replies and all that. And I've looked at the source, it's just plane old HTML, no different from the one I'm sending.

How 'bout you Dani? I know you probably won't read this, but if you do, what experience/problems have you encountered sending out HTML email to all the daniweb members?
Last edited by nathanpacker; Apr 26th, 2007 at 4:15 am.
Reputation Points: 10
Solved Threads: 0
Posting Whiz in Training
nathanpacker is offline Offline
234 posts
since May 2005
Apr 26th, 2007
0

Re: Using CSS in email? Or alternative?

I have outlook 03 and by default HTML messages have all links, scripts and pictures blocked, which makes them useless.
Moderator
Featured Poster
Reputation Points: 1764
Solved Threads: 574
Moderator
jbennet is offline Offline
16,485 posts
since Apr 2005
Apr 26th, 2007
0

Re: Using CSS in email? Or alternative?

Click to Expand / Collapse  Quote originally posted by jbennet ...
I have outlook 03 and by default HTML messages have all links, scripts and pictures blocked, which makes them useless.
I guess with the pictures, you're right, I do have to add the sender to my safe list to see them, but the rest of the HTML seems to render fine. I don't know, I just wish it wasn't such a big deal. I was really proud of the little HTML email I created! Now I'm so sad I may have to trash my baby and go plain text!
Reputation Points: 10
Solved Threads: 0
Posting Whiz in Training
nathanpacker is offline Offline
234 posts
since May 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: My website doesn't work on some computers.
Next Thread in HTML and CSS Forum Timeline: Cross-browser Check Request





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC