views:

73

answers:

2

Does python have a full fledged email library with things for pop, smtp, pop3 with ssl, mime?

If I want to create a web mail interface that pulls emails from email servers, and then shows the emails, along with attachments, can display the sender, subject, etc. (handles all the encoding issues etc).

update its one thing to be available in the libraries and another for them to be production ready. hoping someone who has used them to pull emails w/attachments etc. in a production environment can comment on this. thanks!

+2  A: 

It has all the components you need, in a more modular and flexible arrangement than you appear to envisage -- the standard library's email package deals with the message once you have received it, and separate modules each deal with means of sending and receiving, such as pop, smtp, imap. SSL is an option for each of them (if the counterpart, e.g. mail server, supports it, of course), being basically just "a different kind of socket".

Have you looked at the rich online docs for all of these standard library modules?

Alex Martelli
@alex, its not about existing in the docs, are they production ready for a real web interface? there are commercial products for python, so wondering if the 'free' versions are solid or not.
Blankman
@Blankman, the modules in the Python standard library are quite solid and production-ready. What UI you want to put on top of them (web, GUI, textual, or whatever) is entirely up to you, of course.
Alex Martelli
@alex so does google use the python libs for gmail then? :)
Blankman
@Blankman, I don't think we've ever officially declared what languages are used for what at Google, only that our main languages (in alphabetical order;-) are C++, Java, Python (in fact Javascript is also very crucial indeed to us and observably forms a huge part of the UI for gmail, maps, -). Functionality such as distributing mail load transparently over a huge fleet of server (with replication for data safety), and indexing it for very fast full-text search, I believe, is not supplied by any language's standard or commercially available stand-alone libraries in any of these.
Alex Martelli
+2  A: 

http://posterity.edgewall.org/

http://pypi.python.org/pypi/webmail/1.1.7

http://bobomail.sourceforge.net/

Step 1. Download the above.

Step 2. Read the source.

Step 3. See what libraries they use.

Step 4. Use the same libraries.

S.Lott
wow, those are GREAT links, thanks!
Blankman
bobomail looked to have last version from year 2002, so much has changed since then. PyWebmail also 2005/10/15.
Tony Veijalainen
@Tony Veijalainen: While true, that doesn't invalidate any of these projects as demonstrations of what libraries are really used by real projects. And, BTW, it's probably easier to use one of these projects than it is for someone to write their own from scratch.
S.Lott