5x12 pentomino tiling
«

No Alternative

»

For the second time in as many days I've had problems with multipart email. The first time the email was simply empty, the second time it was unreadable. Why?

Well I should start by explaining about "multipart/alternative". In the good old days email was just plain ASCII text with no font selection or sizing, no emboldening, no images, no colours. And then people decided we needed all these things so they allowed you to do this via HTML. Emails of the first sort have a "content type" of "text/plain" and the second sort are "text/html".

Now there was a problem with the invention of HTML email and that was that many mail clients couldn't display it, either because the software wasn't able to or the display hardware couldn't1.

The solution was "multipart/alternative". The idea was that when you sent an email you send it in both formats "text/plain" and "text/html" and the recipient could then choose how to view it. A good idea and, when done properly it works pretty well2.

Even when it's not done so well, as is the case with Outlook Express for example, the text part is still readable although sometimes it's not pretty.

But lately it's got worse. The first example I had of this is a customer who uses our webmail client and have it set to read the "text/plain" part. They got a blank email. It was only when I got involved that we discovered that the sender had sent a "multipart/alternative" email ... but it had an empty "text/plain" part. Of course what they should have done is sent it as "text/html" only, but by declaring it as "multipart/alternative" our customer's webmail client thought it was safe displayed the "text/plain" part.

Here's the second example. It's part of an email from a Hotmail user. Here's the "text/plain" part:

OK.> > > I'll rework the "About Us" page this week. Promise. In > > the meantime can we take everything off there and put "Page under > > Construction."> > Heh. No. Rule 1 of web site design: never have "under construction" > pages. You either don't put a page up or you put a skeleton up. I've > done the latter.

And this is how it should have read, it's the "text/html" part.

OK.
>
> > I'll rework the "About Us" page this week. Promise. In
> > the meantime can we take everything off there and put "Page under
> > Construction."
>
> Heh. No. Rule 1 of web site design: never have "under construction"
> pages. You either don't put a page up or you put a skeleton up. I've
> done the latter. 

Yup, for some reason it's dumped the newlines, so the email is unreadable if you read the "text/plain" part.

I despair (again).

  1. There was also the problem of people who're blind and rely on reader software but that's a whole bag of worms all on its own.
  2. I would cite the milton-news emails as an example of good practice on this.

Tags: internet Written 01/12/08

Comment on this article

« »
Current status: (via twitter)
Paul has no status set at the moment
I am currently reading:

The Undercover Economist
  by Tim Harford
Extreme Rambling: Walking Israel's Separation Barrier. For Fun.
  by Mark Thomas
The Christ Conundrum by Andrew Carruth

(?)
Word of the Day: