[imp] MIME and misc. weird encoding formats

Michael M Slusarz slusarz@bigworm.colorado.edu
Thu, 3 Oct 2002 17:13:24 -0600


Quoting Sameh Ghane <sw@anthologeek.net>:

| Hi,
| 
| Is there any reason why an email with
| Content-Type: text/html in its headers is not displayed in HTML ? I get
| this
| kind of code:
| &lt;HEAD&gt;<br />^M
| &lt;META CONTENT=&quot;text/html; charset=iso-8859-1&quot;
| HTTP-EQUIV=Content-Type&gt;<br />^M
| 
| So that the HTML source appears clearly, which is not really usable.

I am assuming you are using IMP 3.1.  Anyway, IMP does some "cleaning" of 
HTML attachments to prevent malicious attacks - there are a bunch of 
threads in the mail archives, you should look there.

| [snip]
|
| --B_3113384090_2478960
| Content-type: multipart/alternative; boundary="B_3113384090_2478960"
| 
| 
| --B_3113384090_2478960
| Content-type: text/plain; charset="US-ASCII"
| Content-transfer-encoding: 7bit
| 
| 
| 
| --B_3113384090_2478960
| Content-type: text/html; charset="US-ASCII"
| Content-transfer-encoding: quoted-printable
| 
| <HTML>
| <HEAD>
| <TITLE>FW: ZODIAC SIGNS.ZIP</TITLE>
| </HEAD>
| <BODY>
| <FONT FACE=3D"Verdana"></FONT>
| </BODY>
| </HTML>
| 
| 
| --B_3113384090_2478960--
| 
| 
| --B_3113384090_2478960
| Content-type: application/zip; name="Zodiac Signs.zip";
|  x-mac-creator="5A495020";
|  x-mac-type="5A495020"
| Content-disposition: attachment
| Content-transfer-encoding: base64
| 
| UEsDBBQAAgAIAA4AGy01F1kRrTkAAKE6AAAWAAAAWm9kaWFjIFNpZ25zL2FrcmVwLmpwZ427
| 
| 
| IMP is unable to let me download anything but the first part (the HTML
| stuff).
| What's wrong here: IMP or PEAR'mime decoder ? And how can I tell ?

IMP 3.x doesn't have very good support for multipart/alternative messages.  
IMP CVS will correctly display this message.  BTW, there *should* only be 1 
part shown for this message - a multipart/alternative content-type means 
that a MUA should display the LAST part it can correct show.  IMP CVS does 
this, and additionally will allow you to view/download the other parts (the 
RFC says this is OK, although it is not mandatory).

michael

______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder