On Wed, 26 Apr 2000, Daniel Vainsencher wrote:
BTW, I'm working on getting Celeste to handle MIME attachments it receives. Anyone here will use find this useful? if so, any comment?
Great! I wanted to do this for some time, but never came around doing it. I had displaying/sending iso8859-1 messages working, also in the headers, but I didn't do the encoders, yet (only 8bit sending).
Any comments about the MIME functionality already in squeak? Lex?
There are some MimeConverters (Base64, QuotedPrintable, RFC2047) but only Base64 is for encoding (yet). There's String>>decodeMimeHeader.
I have attachment parsing working - not for Celeste, but for my MailArchiveAction: for example, at http://swiki.gsug.org/SQFIXES/672.html you can click and download your own attachment ;-)
This MIME parsing is based on the (general purpose) LimitingLineStreamWrapper which makes it very easy to parse nested parts - you can wrap wrapped streams, for example: outer := LimitingLineStreamWrapper on: aStream delimiter: '--boundary'. inner := LimitingLineStreamWrapper on: outer delimiter: '--innerbnd'. There's an example method in the class.
-Bert-