[BUG] MailMessage/MIMEDocument parsing doesn't work beyond the
first level.
Ken Causey
ken at ineffable.com
Mon Apr 29 18:20:49 UTC 2002
>
>
> Can you be more explicit, like with some example code? There are two
> #parts floating around, you know -- I bet this is what you bumped into.
> MIMEDocument>>parts is doing guesswork, and it isn't surprising that a
> complex message can trip it up. Now that we have MailMessage>>parts,
> this method should probably go away. At the least, it should be renamed
> #guessParts. Before doing so, however, we just need to figure out if any
> code is still using the old versian.
>
>
>
> -Lex
>
I run into much the same behaviour with both parts messages, as I
explained in the original bug. I'm not sure of the best way to go about
providing example code, but here goes:
a := MailMessage from: 'Return-Path: <ken at ineffable.com>
Received: from localhost.localdomain (ken at temp.ineffable.com
[205.229.226.241])
by mail.premiernet.net (8.12.3/8.12.3/Debian -4) with ESMTP id
g3QI6CKT010267
for <kentest at premiernet.net>; Fri, 26 Apr 2002 13:06:12 -0500
Subject: [Fwd: Attachment]
From: Ken Causey <ken at ineffable.com>
To: kentest at premiernet.net
Content-Type: multipart/mixed; boundary="=-CaP9ddwRV+U2ialyRvBD"
X-Mailer: Ximian Evolution 1.0.3
Date: 26 Apr 2002 13:06:12 -0500
Message-Id: <1019844372.399.37.camel at temp>
Mime-Version: 1.0
X-UIDL: ,57"!O5Y!!%^p"!Zh\!!
Status: RO
--=-CaP9ddwRV+U2ialyRvBD
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
forwarded email with attachment
--=-CaP9ddwRV+U2ialyRvBD
Content-Disposition: inline
Content-Description: Forwarded message - Attachment
Content-Type: message/rfc822
Return-Path: <ken at ineffable.com>
X-Sieve: cmu-sieve 2.0
Received: from mail.premiernet.net [205.229.224.233] by localhost with
POP3
(fetchmail-5.9.0) for ken at localhost (single-drop); Fri, 26 Apr 2002
13:04:15 -0500 (CDT)
Received: from localhost.localdomain (ken at temp.ineffable.com
[205.229.226.241]) by mail.premiernet.net (8.12.3/8.12.3/Debian -4)
with
ESMTP id g3QI3EKT010064; Fri, 26 Apr 2002 13:03:14 -0500
Subject: Attachment
From: Ken Causey <ken at ineffable.com>
To: kentest at premiernet.net
Cc: ken at ineffable.com
Content-Type: multipart/mixed; boundary="=-sT9PYGNIhkbF+ahSUtGM"
X-Mailer: Ximian Evolution 1.0.3
Date: 26 Apr 2002 13:03:14 -0500
Message-Id: <1019844194.399.35.camel at temp>
Mime-Version: 1.0
X-Spam-Status: No, hits=0.0 required=5.0 tests= version=2.11
X-UIDL: //a"!?2Z!!JHC!!K0+!!
--=-sT9PYGNIhkbF+ahSUtGM
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
original attachment
--=-sT9PYGNIhkbF+ahSUtGM
Content-Disposition: attachment; filename=test.txt
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=test.txt; charset=ANSI_X3.4-1968
Test
--=-sT9PYGNIhkbF+ahSUtGM--
--=-CaP9ddwRV+U2ialyRvBD--
'.
To demonstrate my first method:
a body parts second body parts
returns #(). This method uses MIMEDocument>>parts
To demonstrate my second method:
a makeMultipart parts second makeMultipart parts first
at this point you can keep appending 'makeMultipart parts first' and you
continue to get back the same exact result. This method uses
MailMessage>>parts.
Ken
More information about the Squeak-dev
mailing list
|