From: Chris Hall Date: 2006-09-30T00:07:12+09:00 Subject: wrong content-type when trying to parse emails with Net::IMAP i'm trying to parse an email that is supposed to be a multipart/mixed mail but i am not getting back the expected results. data = imap.fetch(7, ["ENVELOPE", "RFC822.HEADER", "BODYSTRUCTURE", "BODY[1]"]) [RFC822.HEADER] ...[some headers removed to protect the innocent]... From: To: me@here.com Date: Thu, 31 Aug 2006 19:03:07 -05:00 Content-type: Multipart/Mixed; boundary=Message-Boundary-22611 X-finfo: DOS,"FOOBAR.ZIP",,,, Subject: foobar inc. in stock inventory Priority: normal X-mailer: Pegasus Mail v3.50 Message-ID: <43CE57C70667@foobar.com> [BODYSTRUCTURE] #"US-ASCII"}, content_id=nil, description=nil, encoding="7BIT", size=218060, lines=2959, md5=nil, disposition=nil, language=nil, extension=nil> [BODY[1] --Message-Boundary-22611 Content-type: text/plain; charset=US-ASCII Content-description: blah blah blah blah blah blah --Message-Boundary-22611 Content-Type: Application/Octet-stream; name=FOOBAR.ZIP Content-transfer-encoding: BASE64 ...[base64 encoded data]... --Message-Boundary-22611-- as you can see above, the content-type is clearly multipart/mixed, but yet, when i dump the bodystructure, i get text/plain. the size and lines corresponds to the size/lines of the body of the email. anyone got any ideas on this one? Chris