By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,395 Members | 1,882 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,395 IT Pros & Developers. It's quick & easy.

send e-mails that show both HTML and plain text?

P: n/a
LRW
I'm not sure this message is totally appropriate for this group, so
please, if anyone has a better group suggestion, let me know!

My company sends out a monthly newsletter in HTML format to our
account holders. We get a couple of people with auto-responders saying
they don't accept HTML e-mails, please send plain-text.

Is there some way to format an e-mail with both versions, maybe
defaulting to HTML format but display plain-text if it detects the
recipient's client is set to display plain-text only?

Thanks for any suggestions!!
Liam
Jul 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
de**@celticbear.com (LRW) writes:
I'm not sure this message is totally appropriate for this group, so
please, if anyone has a better group suggestion, let me know!
It is the wrong group, yes. I'd suggest one of the comp.mail groups.
My company sends out a monthly newsletter in HTML format to our
account holders. We get a couple of people with auto-responders saying
they don't accept HTML e-mails, please send plain-text.
And you probably have a few others who silently delete HTML-formatted
messages.
Is there some way to format an e-mail with both versions,
Yes. Most email clients have an option to send both HTML and plain
text versions. Read the manual that came with your email program/list
software.
maybe defaulting to HTML format but display plain-text if it detects
the recipient's client is set to display plain-text only?


You can't control this, but it seems to be the default behaviour of
many common email programs to display HTML format preferentially if
they are set to display both.

--
Chris
Jul 20 '05 #2

P: n/a
LRW wrote:
I'm not sure this message is totally appropriate for this group, so
please, if anyone has a better group suggestion, let me know!
comp.mail.mime, follow-ups set.
My company sends out a monthly newsletter in HTML format to our
account holders. We get a couple of people with auto-responders saying
they don't accept HTML e-mails, please send plain-text.

Is there some way to format an e-mail with both versions, maybe
defaulting to HTML format but display plain-text if it detects the
recipient's client is set to display plain-text only?


Yes, MIME. It allows you to include both formats in the one message,
which makes the message size significantly more than twice what's
required...

It's pretty easy. Send yourself an email in HTML format from a typical
mail client and look at the message source when you receive it. Google
will tell you more.

--
Mark.

Jul 20 '05 #3

P: n/a
LRW wrote:
I'm not sure this message is totally appropriate for this group, so
please, if anyone has a better group suggestion, let me know!

Is there some way to format an e-mail with both versions, maybe
defaulting to HTML format but display plain-text if it detects the
recipient's client is set to display plain-text only?

If you send out the mail with e.g. Windows/ASP/CDONTS, there will be
created a text fall back automatically for every HTML you send out.
It's really a question of your tools though and not HTML.

--
Google Blogoscoped
http://blog.outer-court.com
Jul 20 '05 #4

P: n/a
de**@celticbear.com (LRW) wrote in
news:3a**************************@posting.google.c om:
I'm not sure this message is totally appropriate for this group, so
please, if anyone has a better group suggestion, let me know!

My company sends out a monthly newsletter in HTML format to our
account holders. We get a couple of people with auto-responders saying
they don't accept HTML e-mails, please send plain-text.

Is there some way to format an e-mail with both versions, maybe
defaulting to HTML format but display plain-text if it detects the
recipient's client is set to display plain-text only?


You are looking at it the wrong way.
Presumably these "account holders" are people whose business
your company values. Why annoy them by sending some of them
things they don't like(or maybe want). Your database of
"account holders" should have options to specify whether or
not to send the monthly newsletter to that account holder,
and whether to use HTML or plain text. All account holders
should have the means to set the values they want for their
account, and if you get an email bounce saying "plain text
emails only", then one of your staff should change the database
setting for that account.

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Jul 20 '05 #5

P: n/a
LRW wrote:
I'm not sure this message is totally appropriate for this group, so
please, if anyone has a better group suggestion, let me know!
I've crossposted and set followups to comp.mail.misc.
My company sends out a monthly newsletter in HTML format to our
account holders. We get a couple of people with auto-responders saying
they don't accept HTML e-mails, please send plain-text.
And rightfully so; there are a good many sysadmins that believe HTML does
not belong in e-mail. I get virtually no legitimate e-mail in HTML format,
and except for a handful of senders, that e-mail goes straight into the
trash folder.
Is there some way to format an e-mail with both versions, maybe
defaulting to HTML format but display plain-text if it detects the
recipient's client is set to display plain-text only?


Send HTML only to those that have asked for HTML. Send plain text only to
those that have not asked for HTML. If in doubt, send in plain text only.
Sending both types is wasteful of resources, especially given the typical
bloat of HTML e-mail (2 to 3 times, minimum).

--
Shawn K. Quinn
Jul 20 '05 #6

P: n/a
On Tue, 15 Jun 2004 16:37:49 GMT, Dave Patton <no**@none.com> wrote:
Why annoy them by sending some of them
things they don't like(or maybe want).


Because it's your job to do so, and that's what your boss insists on.

Yes, there are drawbacks to doing this. But many of us don't have the
option to change it. Let's not shoot the messenger here.

I suggest the original poster learns what an RFC is, and how to read
one. I don;t know the numbers offhand, but there are ways to ship just
what they want, and it's some of the RFCs related to MIME that will
hold the _real_ specification of how to do it correctly.

--
Smert' spamionam
Jul 20 '05 #7

P: n/a
LRW
I got a couple of recommendations of better groups to post to, but
since some people have kindly replied here with suggestions and tips,
I thought I'd reply with my findings.

I found an example of a way to send an e-mail in both HTML and Plain
formats which allows the mail client to decide which one to use.
It's in PHP, which is what I use, but I'm certain the same thing can
easily be done in ASP:
<?php
$to="Recipient Name <so******@example.com>";
$from="Sender Name <jd**@example.com>";
$subject="My first HTML E-mail";
$mime_boundary="==Multipart_Boundary_x".md5(mt_ran d())."x";
$headers = "From: $from\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type:multipart/alternative;\n" .
" boundary=\"{$mime_boundary}\r\n\"";
$headers.= "From: $from\r\n";
$message = "This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
"HTML E-mail\n\nThis is the text portion of an HTML e-mail\n" .
"--{$mime_boundary}\n" .
"Content-Type: text/html; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
"<h1>HTML E-mail</h1>" .
"<p>This is an <b>HTML</b> e-mail.</p>";
if (mail($to, $subject, $message, $headers))
echo "Message Sent!";
else
echo "Failed to send message.";
?>

It indeed does involve MIME as one person suggested, although I don't
know if RFC is involved...or even what that is. =)

And in reply to one poster, I agree that HTML e-mail in general has
questionable use since most of it is generally spam, but it really is
a good way to send newsletters, and in our case, a series of "how to
use your new account" instructions including screenshots of what our
clients will see.
Lockergnome.com is one in which uses regular HTML newsletters
mailings. But, it's all personal preference. =)

Thanks all who replied, especially when all you had to do was say "use
newsgroup x.y.z newbie!" =)
Liam
Jul 20 '05 #8

P: n/a
de**@celticbear.com (LRW) wrote in message news:<3a**************************@posting.google. com>...
My company sends out a monthly newsletter in HTML format to our
account holders. We get a couple of people with auto-responders saying
they don't accept HTML e-mails, please send plain-text.
Commentary on the pros and cons of text vs. HTML e-mail:
http://mailformat.dan.info/body/html.html
Is there some way to format an e-mail with both versions, maybe
defaulting to HTML format but display plain-text if it detects the
recipient's client is set to display plain-text only?


Multipart MIME messages can be sent that way, and usually are by
default in programs that send HTML (other than a few like Hotmail that
send HTML only with no plain text version, which causes problems on
mailing lists that reject non-plaintext messages).

Some more info:
http://mailformat.dan.info/headers/mime.html

Some of the better mail programs, including Pegasus Mail, let you
configure whether to show the "plain" or "fancy" versions of a
multipart MIME message.

--
Dan
Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.