From nicholas.cole at gmail.com Tue Apr 17 13:34:35 2007 From: nicholas.cole at gmail.com (Nicholas Cole) Date: Tue, 17 Apr 2007 12:34:35 +0100 Subject: [Email-SIG] Cloning a message Message-ID: I've been scratching my head over this problem (in part thinking about the PGP/MIME RFC), and although it seems that it ought to have a trivial solution, I can't work out what it should be. How do I take all the parts of Message A, and attach them to a new message object? I don't want to preserve the email headers themselves, only the MIME parts. Best wishes, Nicholas From barry at python.org Tue Apr 17 14:26:50 2007 From: barry at python.org (Barry Warsaw) Date: Tue, 17 Apr 2007 08:26:50 -0400 Subject: [Email-SIG] Cloning a message In-Reply-To: References: Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Apr 17, 2007, at 7:34 AM, Nicholas Cole wrote: > I've been scratching my head over this problem (in part thinking about > the PGP/MIME RFC), and although it seems that it ought to have a > trivial solution, I can't work out what it should be. > > How do I take all the parts of Message A, and attach them to a new > message object? I don't want to preserve the email headers > themselves, only the MIME parts. Untested, perhaps something like: if msg.is_multipart(): for part in msg.get_payload(): newmsg.attach(part) - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRiS9EXEjvBPtnXfVAQIX9AP+I4hUnn0appV8B0H0nYtwQhVJuJ++PbSW B+0aw9aKpXCi3ZS/hU+Xcm+pPCwHyoX7XRZ8qPlMAd4DfB/Sua+31ug+ZyAOFBq7 3xVj2KxQ4BKGzXVCAaIedzsC9RGeCHNAWVitdZV0ydEDHnjAuJ8G3Mpi//HLB1YV nvjRc7OT1nw= =hXZu -----END PGP SIGNATURE----- From barry at python.org Wed Apr 25 22:12:10 2007 From: barry at python.org (Barry Warsaw) Date: Wed, 25 Apr 2007 16:12:10 -0400 Subject: [Email-SIG] email 4.0.2 Message-ID: <98F9D4D0-633A-42BF-B8A1-71F1FC94781D@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tokio Kikuchi was looking for an email 4.0.2 package release, and I finally got around to building that and installing it to the Cheeseshop: http://cheeseshop.python.org/pypi/email/4.0.2 There are eggs for Python 2.4 and 2.5, and a source tarball. This is exactly what got release with Python 2.5.1, except that the version number got bumped to 4.0.2. I'm sorry I didn't get to that before the 2.5.1 release. Cheers, - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRi+2GnEjvBPtnXfVAQLiDQP9Ffn4M490JZHt2gLLIO+FheLBhMpmW6KU vPhADxijoY9qX/Uh02e/2FK4TAZ09bQ0Ylih0zNNN5IntNa1DY+5LhP4lAaODpQ3 0v7Znez57VAiZ8xLhMF0r9yUMdpVFRid6ebdtyy7UItU6d4IPwN92zDk6EQSxU6Y +iJ5KlrFAq0= =e8Rw -----END PGP SIGNATURE----- From jason at mastaler.com Thu Apr 26 21:39:10 2007 From: jason at mastaler.com (Jason R. Mastaler) Date: Thu, 26 Apr 2007 13:39:10 -0600 Subject: [Email-SIG] email 4.0.2 References: <98F9D4D0-633A-42BF-B8A1-71F1FC94781D@python.org> Message-ID: Barry Warsaw writes: > This is exactly what got release with Python 2.5.1, except that the > version number got bumped to 4.0.2. Still compatible with Python 2.3.x ? From barry at python.org Thu Apr 26 22:25:28 2007 From: barry at python.org (Barry Warsaw) Date: Thu, 26 Apr 2007 16:25:28 -0400 Subject: [Email-SIG] email 4.0.2 In-Reply-To: References: <98F9D4D0-633A-42BF-B8A1-71F1FC94781D@python.org> Message-ID: <7CAEB938-CBAC-4D7F-B1FF-C716534B1201@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Apr 26, 2007, at 3:39 PM, Jason R. Mastaler wrote: > Barry Warsaw writes: > >> This is exactly what got release with Python 2.5.1, except that the >> version number got bumped to 4.0.2. > > Still compatible with Python 2.3.x ? Yep. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRjEKuHEjvBPtnXfVAQLpEAP9EvZwmV43tnxe3cTQshJo7AGSxejsb7IK SDVpIRbh7ftvhpE/sS0xj7Hw6BSrQVV9jU4Gz8aWkaOtzvnkjgOY72bWovUrFO8b Y30xOkavpgFqIPSXHeNsP4gLdKrFVDOMMiskEiUnxO42wOT3xxjW/PnKbruWatH5 E7yD2UswXzY= =IXn1 -----END PGP SIGNATURE-----