Solved

detecting HTML based e-mail

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
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 …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

730 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