Solved

detecting HTML based e-mail

Posted on 2000-03-06
2
134 Views
Last Modified: 2013-12-25
I want to create an HTML based newsletter that is sent to users that subscribed to it. The problem is that if users do not have an HTML capable mail reader, then they can can not read the newsletter. Is there a way to autodetect if the client is capable of interpreting HTML and then send the appropriate version of the newsletter (HTML or text)?
0
Comment
Question by:mjara1
2 Comments
 
LVL 18

Expert Comment

by:mgfranz
ID: 2589366
Nope.  What you are asking for is essentially a way to tell if the user is going to open their email in a browser based client, a POP3 type viewer, or with a telnet session.  Sorry, the only way I can suggest is to submit both in the same message, the HTML based first, then tag on the text version.  

Most MIME-aware Internet mail applications are already able to either properly format text/enriched mail or, at the very least, are able to strip out the formatting commands and display the readable text. The same is not true for HTML or SGML.  The current RFC on HTML [RFC-1866] and Internet Drafts on SGML have many features which are not necessary for Internet mail, and are missing a few capabilities that text/enriched already has.

If you are able to come up with a solution please let me know...
0
 
LVL 8

Accepted Solution

by:
jhurst earned 100 total points
ID: 2589680
typically the way this is handled is to use a multi-part message with the html version and a plainn/text version marked as an alternate.

From: mere@here.now
Subject: your subject
Mime-Version: 1.0
Content-Type: multipart/related;
        type="multipart/alternative";
        boundary="=====================_1068495==_.REL"
Status: RO

--=====================_1068495==_.REL
Content-Type: multipart/alternative;
        boundary="=====================_1068503==_.ALT"

--=====================_1068503==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

This is a special version since your mail reader
does not seem able to handle html pages

Your message here

--=====================_1068503==_.ALT
Content-Type: text/html; charset="us-ascii"
--=====================_1068503==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
html version of the message
<br>
<img src="cid:4.3.0.20000221163251.00a72290@shy.com.0" alt="Image"></html>

--=====================_1068503==_.ALT--

--=====================_1068495==_.REL
Content-Type: application/octet-stream; name="47125.$$itp"
Content-ID: <4.3.0.20000221163251.00a72290@shy.com.0>
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="image.jpg"

An image goes here
--=====================_1068495==_.REL--

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now