From dreis.pt at hotmail.com Mon Feb 4 10:39:51 2013 From: dreis.pt at hotmail.com (Daniel Reis) Date: Mon, 4 Feb 2013 09:39:51 +0000 Subject: [Email-SIG] FW: [Python-ideas] Standard library high level support for email messages In-Reply-To: <20130131124805.0F43F250BC1@webabinitio.net> References: , , , , , <20130130162826.D2F95250BC7@webabinitio.net>, , <20130131124805.0F43F250BC1@webabinitio.net> Message-ID: David, > > > PS: what is pyzlib? It sounds like a wrapper for zlib, which is what > > > I get when I google for it. Got it: it's one of the top results if you search for "mail" in PyPi: http://pypi.python.org/pypi?%3Aaction=search&term=mail&submit=search > Well, I'd prefer to avoid that at this stage, and leave those > considerations for a later stage. This is because that would lock us in > to a particular, relatively complex API. It would probably be better to > leave that as a non-stdlib wrapper class for now, as we make the email > library more and more complete so that such wrappers become simpler and > simpler, until it becomes clear if/where to add it to the library. This wrapper is really needed. Or at the very least. the examples in the Python docs should provide a complete example on generating an e-mail with text/html alternate parts plus attachments. They don't. I found a very good for-dummies reference and implementation here: http://blog.magiksys.net/generate-and-send-mail-with-python-tutorial (PS: just found out that it's author, Alain Spineux, is the author of pyzmail ...) As an example, buiding an email looks like this: mail=gen_mail( (my_utext.encode('iso-8859-1'), 'iso-8859-1'), (my_html, 'us-ascii'), my_attachments, my_related_parts_list) > So, right now the most helpful thing would be reviewing bugs (tagged > 'email' in the tracker) and fixes. Alternatively you could take a look > at how I/we have done the header_factory in the new code, and think > about what the corresponding message_factory would look like. That will > be the thing that will make managing attachments easier, and is what I > plan to work on after finishing the list above. Most of this is not very related to my current work and skill set. So unfortunately I'm afraid I wouldn't be much help. Maybe I could help improve the docs to add the more complete email usage example, but would most certainly be at the expense of Alain Spineux's work ... Regards Daniel Reis -------------- next part -------------- An HTML attachment was scrubbed... URL: