From wichert at wiggy.net Fri Dec 3 16:13:21 2004 From: wichert at wiggy.net (Wichert Akkerman) Date: Fri Dec 3 16:13:22 2004 Subject: [Email-SIG] encoding To headers In-Reply-To: References: Message-ID: <20041203151321.GL17614@wiggy.net> I am trying to figure out how to use an 'internationaled' To-header but not succeeding so far. The basic documented approach does not work: >>> mail["From"]=email.Header.Header(, "utf-8") >>> print mail.as_string() [...] From: =?utf-8?b?dMODwrhzdGk=?= this is not allowed by the RFCs: the address must not be encoded. Using quoted-printable would fix this but I can not find any documentation as to how to do that. All current documentation mentions that specifying encoders is deprecated, but without setting them the email module seems to insist on using base64 encoding. Wichert. -- Wichert Akkerman It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. From alex at dailycandy.com Fri Dec 3 19:13:30 2004 From: alex at dailycandy.com (Alex Burgel) Date: Fri Dec 3 19:11:53 2004 Subject: [Email-SIG] quoted printable implementations Message-ID: Hi, I need to encode some stuff as quoted-printable. There seems to be 3 implementations: the quopri module, binascii module, and email.quopriMIME. Does anyone know why there are two version? Is there a recommended one? I know the quopri and email.quopriMIME modules are implemented in python, but I'm not sure about binascii, is that implemented in C? Thanks. --Alex From bkirsch at osafoundation.org Wed Dec 15 00:00:46 2004 From: bkirsch at osafoundation.org (Brian Kirsch) Date: Wed Dec 15 00:02:55 2004 Subject: [Email-SIG] Real World Message Parsing example In-Reply-To: References: Message-ID: Hello, The time has come for our Open Source product Chandler (http://www.osafoundation.org) to add robust message parsing. Can some point me to a mail client application (source code viewable) that utilizes the Python email parsing library for MIME parsing. I have seen lots of simple examples utilizing the email package but would love to see some real world code that is leveraging it. Your help is greatly appreciated. Thanks, Brian Kirsch - Email Framework Engineer Open Source Applications Foundation 543 Howard St. 5th Floor? San Francisco, CA 94105? (415) 946-3056? From andrew at logicalprogression.net Wed Dec 15 00:10:17 2004 From: andrew at logicalprogression.net (Andrew Veitch) Date: Wed Dec 15 00:08:56 2004 Subject: [Email-SIG] Real World Message Parsing example In-Reply-To: References: Message-ID: <5170B26D-4E25-11D9-B908-000D9329A36C@logicalprogression.net> Hi Check out Mail Manager at http://mailmanager.sourceforge.net/ We're processing a few million messages on our commercial service with it, in various languages and the Python email library has been rock solid. Andrew On 14 Dec 2004, at 23:00, Brian Kirsch wrote: > Hello, > The time has come for our Open Source product Chandler > (http://www.osafoundation.org) to add robust message parsing. Can some > point me to a mail client application (source code viewable) that > utilizes the Python email parsing library for MIME parsing. I have > seen lots of simple examples utilizing the email package but would > love to see some real world > code that is leveraging it. Your help is greatly appreciated. > -- Logical Progression Ltd, 20 Forth Street, Edinburgh EH1 3LH, UK Tel: +44 (0)131 550 3733 Web: http://www.logicalprogression.net/ From matt at mondoinfo.com Wed Dec 15 00:19:42 2004 From: matt at mondoinfo.com (Matthew Dixon Cowles) Date: Wed Dec 15 00:20:32 2004 Subject: [Email-SIG] Real World Message Parsing example In-Reply-To: References: Message-ID: <1103065494.61.4630@mint-julep.mondoinfo.com> Dear Brian, > The time has come for our Open Source product Chandler > (http://www.osafoundation.org) to add robust message parsing. Can > some point me to a mail client application (source code viewable) > that utilizes the Python email parsing library for MIME parsing. I > have seen lots of simple examples utilizing the email package but > would love to see some real world code that is leveraging it. Your > help is greatly appreciated. There's one at: http://www.mondoinfo.com/swallow/ Despite the disclaimer, I use it for all my mail. I've just uploaded a new version. Regards, Matt From andrew at logicalprogression.net Wed Dec 15 00:35:13 2004 From: andrew at logicalprogression.net (Andrew Veitch) Date: Wed Dec 15 00:33:53 2004 Subject: [Email-SIG] format=flowed Message-ID: I've just been reading the format=flowed RFC (http://www.ietf.org/rfc/rfc2646.txt) Eudora, Mozilla, Opera, Apple Mail.app and - the clincher in any argument about email standards - Hotmail (!) all use it by default. It would be a really neat addition to the email library. Andrew -- Logical Progression Ltd, 20 Forth Street, Edinburgh EH1 3LH, UK Tel: +44 (0)131 550 3733 Web: http://www.logicalprogression.net/ From bkirsch at osafoundation.org Wed Dec 22 22:05:49 2004 From: bkirsch at osafoundation.org (Brian Kirsch) Date: Wed Dec 22 22:09:52 2004 Subject: [Email-SIG] Real World Message Parsing example In-Reply-To: <1103065494.61.4630@mint-julep.mondoinfo.com> References: <1103065494.61.4630@mint-julep.mondoinfo.com> Message-ID: <41DB3A86-545D-11D9-A823-000A95CA1ECC@osafoundation.org> Hello, I am looking for examples of real world apps (source code viewable) that are leveraging the Python email API's for message parsing. So far I have looked at Swallow and MailManager which are both good examples. Are there any others that I missed? Thanks, Brian Kirsch - Email Framework Engineer Open Source Applications Foundation 543 Howard St. 5th Floor? San Francisco, CA 94105? (415) 946-3056? http://www.osafoundation.org On Dec 14, 2004, at 3:19 PM, Matthew Dixon Cowles wrote: > Dear Brian, > >> The time has come for our Open Source product Chandler >> (http://www.osafoundation.org) to add robust message parsing. Can >> some point me to a mail client application (source code viewable) >> that utilizes the Python email parsing library for MIME parsing. I >> have seen lots of simple examples utilizing the email package but >> would love to see some real world code that is leveraging it. Your >> help is greatly appreciated. > > There's one at: > > http://www.mondoinfo.com/swallow/ > > Despite the disclaimer, I use it for all my mail. I've just uploaded > a new version. > > Regards, > Matt > From phd at mail2.phd.pp.ru Wed Dec 22 22:36:10 2004 From: phd at mail2.phd.pp.ru (Oleg Broytmann) Date: Wed Dec 22 22:36:17 2004 Subject: [Email-SIG] Real World Message Parsing example In-Reply-To: <41DB3A86-545D-11D9-A823-000A95CA1ECC@osafoundation.org> References: <1103065494.61.4630@mint-julep.mondoinfo.com> <41DB3A86-545D-11D9-A823-000A95CA1ECC@osafoundation.org> Message-ID: <20041222213610.GA23173@phd.pp.ru> On Wed, Dec 22, 2004 at 01:05:49PM -0800, Brian Kirsch wrote: > I am looking for examples of real world apps (source code viewable) > that are leveraging the Python email API's for message parsing. So far > I have looked at Swallow and MailManager which are both good examples. > Are there any others that I missed? MIME decode - a program to decode MIME messages. Useful for multicharset mail lists archives and such. http://phd.pp.ru/Software/Python/#mimedecode Please be warned that license is GPL. Some people are afraid of even looking at GPLed code. Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. From barry at python.org Wed Dec 22 23:24:03 2004 From: barry at python.org (Barry Warsaw) Date: Wed Dec 22 23:24:10 2004 Subject: [Email-SIG] Real World Message Parsing example In-Reply-To: <41DB3A86-545D-11D9-A823-000A95CA1ECC@osafoundation.org> References: <1103065494.61.4630@mint-julep.mondoinfo.com> <41DB3A86-545D-11D9-A823-000A95CA1ECC@osafoundation.org> Message-ID: <1103754243.9387.42.camel@geddy.wooz.org> On Wed, 2004-12-22 at 16:05, Brian Kirsch wrote: > Hello, > I am looking for examples of real world apps (source code viewable) > that are leveraging the Python email API's for message parsing. So far > I have looked at Swallow and MailManager which are both good examples. > Are there any others that I missed? Mailman is where it all started, of course. :) -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/email-sig/attachments/20041222/272cee44/attachment.pgp From barry at python.org Wed Dec 22 23:24:57 2004 From: barry at python.org (Barry Warsaw) Date: Wed Dec 22 23:25:01 2004 Subject: [Email-SIG] Real World Message Parsing example In-Reply-To: <20041222213610.GA23173@phd.pp.ru> References: <1103065494.61.4630@mint-julep.mondoinfo.com> <41DB3A86-545D-11D9-A823-000A95CA1ECC@osafoundation.org> <20041222213610.GA23173@phd.pp.ru> Message-ID: <1103754297.9379.44.camel@geddy.wooz.org> On Wed, 2004-12-22 at 16:36, Oleg Broytmann wrote: > MIME decode - a program to decode MIME messages. Useful for > multicharset mail lists archives and such. Oh yeah, spambayes uses it too. -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/email-sig/attachments/20041222/0eebec62/attachment.pgp From tim at sitefusion.co.uk Sun Dec 26 18:17:18 2004 From: tim at sitefusion.co.uk (Tim Hicks) Date: Sun Dec 26 18:17:20 2004 Subject: [Email-SIG] persisting email.Message.Message instances Message-ID: <2528.81.105.12.31.1104081438.squirrel@81.105.12.31> Hi all, I'm trying to come up with the best way to persist Message instances (using ZODB). After playing around for a bit, I came up with some code that works (I think). If you look at , you can see what I've done. The PersistentMessage class is my second attempt, while the DeeplyPersistentMessage class was my first (rather flawed) attempt. The reason I'm writing to the list is that I've realised a couple of things that I'd quite like the email package to offer, so I thought I'd ask. My PersistentMessage class seems like a fair few too many LOC for what it really does. If email.Message.Message automatically called a specific method, say '_ob_changed' whenever the instance was changed, with a default implementation looking like:: def _ob_changed(self): pass then my PersistentMessage implementation could simply look like:: class PersistentMessage(Message, Persistent): def _ob_changed(self): self._p_changed = True Does this sound like a good idea? The second thing is that I think I want to be able to specify the class/factory that is used when Message sub-parts are constructed. That is, I want each message-part of my PersistentMessage instances to also be PersistentMessage instances. This is because I want to (a) stop ZODB bloat when I make changes to message attachments where other (potentially large) attachments are also present; (b) have the benefits of the solution to the _ob_changed method outlined above; (c) have security declarations from Zope3 ZCML in effect; (d) related to b and c, not have to worry about protecting PersistentMessage methods that return objects (i.e. message-parts) that can then be mutated in place. I hope that all makes sense. Comments and guidance very much appreciated. cheers, Tim