ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH
advanced | search help

Reference
ActivePython 2.4
Python Documentation
Library Reference
11. Internet Protocols and Support
11.1 webbrowser -- Convenient Web-browser controller
11.2 cgi -- Common Gateway Interface support.
11.3 cgitb -- Traceback manager for CGI scripts
11.4 urllib -- Open arbitrary resources by URL
11.5 urllib2 -- extensible library for opening URLs
11.6 httplib -- HTTP protocol client
11.7 ftplib -- FTP protocol client
11.8 gopherlib -- Gopher protocol client
11.9 poplib -- POP3 protocol client
11.9.1 POP3 Objects
11.9.2 POP3 Example
11.10 imaplib -- IMAP4 protocol client
11.11 nntplib -- NNTP protocol client
11.12 smtplib -- SMTP protocol client
11.13 smtpd -- SMTP Server
11.14 telnetlib -- Telnet client
11.15 urlparse -- Parse URLs into components
11.16 SocketServer -- A framework for network servers
11.17 BaseHTTPServer -- Basic HTTP server
11.18 SimpleHTTPServer -- Simple HTTP request handler
11.19 CGIHTTPServer -- CGI-capable HTTP request handler
11.20 cookielib -- Cookie handling for HTTP clients
11.21 Cookie -- HTTP state management
11.22 xmlrpclib -- XML-RPC client access
11.23 SimpleXMLRPCServer -- Basic XML-RPC server
11.24 DocXMLRPCServer -- Self-documenting XML-RPC server
11.25 asyncore -- Asynchronous socket handler
11.26 asynchat -- Asynchronous socket command/response handler

MyASPN >> Reference >> ActivePython 2.4 >> Python Documentation >> Library Reference >> 11. Internet Protocols and Support
ActivePython 2.4 documentation

11.9 poplib -- POP3 protocol client

This module defines a class, POP3, which encapsulates a connection to a POP3 server and implements the protocol as defined in RFC 1725. The POP3 class supports both the minimal and optional command sets. Additionally, this module provides a class POP3_SSL, which provides support for connecting to POP3 servers that use SSL as an underlying protocol layer.

Note that POP3, though widely supported, is obsolescent. The implementation quality of POP3 servers varies widely, and too many are quite poor. If your mailserver supports IMAP, you would be better off using the imaplib.IMAP4 class, as IMAP servers tend to be better implemented.

A single class is provided by the poplib module:

class POP3( host[, port])
This class implements the actual POP3 protocol. The connection is created when the instance is initialized. If port is omitted, the standard POP3 port (110) is used.

class POP3_SSL( host[, port[, keyfile[, certfile]]])
This is a subclass of POP3 that connects to the server over an SSL encrypted socket. If port is not specified, 995, the standard POP3-over-SSL port is used. keyfile and certfile are also optional - they can contain a PEM formatted private key and certificate chain file for the SSL connection.

New in version 2.4.

One exception is defined as an attribute of the poplib module:

exception error_proto
Exception raised on any errors. The reason for the exception is passed to the constructor as a string.

See Also:

Module imaplib:
The standard Python IMAP module.
Frequently Asked Questions About Fetchmail
The FAQ for the fetchmail POP/IMAP client collects information on POP3 server variations and RFC noncompliance that may be useful if you need to write an application based on the POP protocol.



See About this document... for information on suggesting changes.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved