I just have to publicly note some issues I've run into with generating MIME documents. I hope that this helps anyone encountering the same issues. MIME is truly a loose format with its parent applications doing what they please so long as it doesn't interfere with the remaining majority. It's quite easy to read the RFC and another thing to leap into the turbulent sea of actual email messages.
1. Empty or malformed message. Use "H" to see raw text.
Error from PINE which, as you can see, explains exactly what the issue is. It will show this anytime it simply bails from parsing a MIME document. For me, it was because I hadn't surrounded the boundary parameter of the Content-Type header with quotes:
Content-Type: multipart/mixed;
boundary="----_=_Otechski:MimeDoc_010_ejpeeop87w"
I'm quite afraid to find out what else can cause PINE to do this.
2. Entire body shown as plain text (vs divided into separate parts)
You most likely forgot the boundary parameter in the Content-Type header or the MIME-Version header. The latter is a superfluous thing designed only to consume space as a reservation for future usefulness.
3. E-mails from Yahoo! do not retain the charset/language
In this case, it's Yahoo!'s bug. Here's something you can try: send out a dummy email from Yahoo! with some Chinese characters and view it from the sent folder. If you're using a non-Chinese-localized version of Windows then chances are you'll just see garbly gook displayed in Yahoo!'s webmail when viewing that email. The reason: Yahoo! does not set the charset parameter of the Content-Type header correctly. It always defaults it to something like US-ASCII or ISO-8859-1 (US English).
This is really annoying, because their pretty much the most popular email client right now.
The HTTP Post made through their webmail should include the character set and Yahoo! should either keep it or convert it to whatever one they're going to use. You can try to guess the character set, but whatever you do don't honor the ISO-8859-1 or US-ASCII values if you get them from Yahoo!.
4. Yahoo!'s Non-Attachments
Ugh, so when you add an attachment to a MIME document it's a very simple matter to mark it "attachment". There's a Content-Disposition header for this very purpose:
Content-Disposition: attachment;
filename="WoWScrnShot_032806_222603.jpg"
Of course Yahoo! just can't let it be that simple. They mark files you attach as "inline" which is generally used for parts which extend the textual body. I realize they're not the only client to do this, but it then makes it more difficult to distinguish between what is the body and what are attachments.
Tuesday, July 04, 2006
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment