Solved

detecting HTML based e-mail

Posted on 2000-03-06
2
137 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

785 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