Re: PATCH: don't include text/html in reply, ...



On 2001.08.22 18:52:03 +0100 Albrecht Dreß wrote:
> Hi all!
> 
> I frequently get HTML mails from Micro$not Outlook (ugh). Upon reply or
> forward, balsa includes both the plain text and the text/html part, which is
> not exactly what I want. The attached patch for libbalsa/mime.c checks if a
> part of type text has html as subtype and in this case excludes it form the
> reply, ...

Good idea

> I *think* some RFC (I forgot which one) states that a mail with a html body
> should *always* have a copy in text/plain format (is this correct?). So the
> method should be safe...

Nah!  The RFCs in question are RFC 2045 - 2049.  RFC 2046, which defines
multipart/alternative, states that alternative renedrings of the same document
are ordered from least preferred to most preferred.

There is no requirement for a text/plain part to be present.  The only requirement
on a document is that it conforms to RFC 2822 and MIME.

Sorry.

> Opinions?

Right, now I've got fact out of the way - HTML mail is shite, not to put too
fine a point on it.

Sadly back to the world of fact; I occasionally see references by some to
HTML mail being non-standard.  Sadly, those who say that are wrong.  There is
even an RFC for aggregate documents in mail - RFC 2557.  This defines
multipart/related for this purpose.

I suppose, strictly a HTML mail with a couple of in line images and a
text/plain equivalent should have the following structure

multipart/alternative
	multipart/related
		text/html
		image/png	(hah! probably patent encumbered image/gif)
		image/jpeg
	text/plain

I'd bet nobody does it like this though.

Brian Stafford




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]