Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 0b7eb7009605a11593fbe388d7fbee61 > files > 512

python-docs-2.2-9.1mdk.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>11.9 poplib -- POP3 protocol client</title>
<META NAME="description" CONTENT="11.9 poplib -- POP3 protocol client">
<META NAME="keywords" CONTENT="lib">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<meta http-equiv="Content-Type" content="text/html; charset=">
<link rel="STYLESHEET" href="lib.css">
<link rel="first" href="lib.html">
<link rel="contents" href="contents.html" title="Contents">
<link rel="index" href="genindex.html" title="Index">
<LINK REL="next" href="module-imaplib.html">
<LINK REL="previous" href="module-gopherlib.html">
<LINK REL="up" href="internet.html">
<LINK REL="next" href="pop3-objects.html">
</head>
<body>
<DIV CLASS="navigation">
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="module-gopherlib.html"><img src="../icons/previous.gif"
  border="0" height="32"
  alt="Previous Page" width="32"></A></td>
<td><A href="internet.html"><img src="../icons/up.gif"
  border="0" height="32"
  alt="Up One Level" width="32"></A></td>
<td><A href="pop3-objects.html"><img src="../icons/next.gif"
  border="0" height="32"
  alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td><A href="contents.html"><img src="../icons/contents.gif"
  border="0" height="32"
  alt="Contents" width="32"></A></td>
<td><a href="modindex.html" title="Module Index"><img src="../icons/modules.gif"
  border="0" height="32"
  alt="Module Index" width="32"></a></td>
<td><A href="genindex.html"><img src="../icons/index.gif"
  border="0" height="32"
  alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="module-gopherlib.html">11.8 gopherlib  </A>
<b class="navlabel">Up:</b> <a class="sectref" href="internet.html">11. Internet Protocols and</A>
<b class="navlabel">Next:</b> <a class="sectref" href="pop3-objects.html">11.9.1 POP3 Objects</A>
<br><hr>
</DIV>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION0013900000000000000000">
11.9 <tt class="module">poplib</tt> --
         POP3 protocol client</A>
</H1>

<P>


<P>
<a name="l2h-2481">&nbsp;</a>
<P>
This module defines a class, <tt class="class">POP3</tt>, which encapsulates a
connection to an POP3 server and implements the protocol as defined in
<a class="rfc" name="rfcref-63279"
href="http://www.faqs.org/rfcs/rfc1725.html">RFC 1725</a>.  The <tt class="class">POP3</tt> class supports both the minimal and
optional command sets.

<P>
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 <code><tt class="module"><a href="module-imaplib.html">imaplib</a></tt>.<tt class="class">IMAP4</tt></code> class, as IMAP
servers tend to be better implemented.

<P>
A single class is provided by the <tt class="module">poplib</tt> module:

<P>
<dl><dt><b><span class="typelabel">class</span> <a name="l2h-2479"><tt class="class">POP3</tt></a></b>(<var>host</var><big>[</big><var>, port</var><big>]</big>)
<dd>
This class implements the actual POP3 protocol.  The connection is
created when the instance is initialized.
If <var>port</var> is omitted, the standard POP3 port (110) is used.
</dl>

<P>
One exception is defined as an attribute of the <tt class="module">poplib</tt> module:

<P>
<dl><dt><b><span class="typelabel">exception</span> <a name="l2h-2480"><tt class="exception">error_proto</tt></a></b>
<dd>
Exception raised on any errors.  The reason for the exception is
passed to the constructor as a string.
</dl>

<P>
<div class="seealso">
  <p class="heading"><b>See Also:</b></p>

  <dl compact class="seemodule">
    <dt>Module <b><tt class="module"><a href="module-imaplib.html">imaplib</a></tt>:</b>
    <dd>The standard Python IMAP module.
  </dl>
  <dl compact class="seetitle">
    <dt><em class="citetitle"
        >http://www.tuxedo.org/&nbsp;esr/fetchail/fetchmail-FAQ.html</em>
    <dd>
	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 poplib.
  </dl> 
</div>

<P>

<p><hr>
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a>

<UL CLASS="ChildLinks">
<LI><A href="pop3-objects.html">11.9.1 POP3 Objects</a>
<LI><A href="pop3-example.html">11.9.2 POP3 Example</a>
</ul>
<!--End of Table of Child-Links-->

<DIV CLASS="navigation">
<p><hr>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="module-gopherlib.html"><img src="../icons/previous.gif"
  border="0" height="32"
  alt="Previous Page" width="32"></A></td>
<td><A href="internet.html"><img src="../icons/up.gif"
  border="0" height="32"
  alt="Up One Level" width="32"></A></td>
<td><A href="pop3-objects.html"><img src="../icons/next.gif"
  border="0" height="32"
  alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td><A href="contents.html"><img src="../icons/contents.gif"
  border="0" height="32"
  alt="Contents" width="32"></A></td>
<td><a href="modindex.html" title="Module Index"><img src="../icons/modules.gif"
  border="0" height="32"
  alt="Module Index" width="32"></a></td>
<td><A href="genindex.html"><img src="../icons/index.gif"
  border="0" height="32"
  alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="module-gopherlib.html">11.8 gopherlib  </A>
<b class="navlabel">Up:</b> <a class="sectref" href="internet.html">11. Internet Protocols and</A>
<b class="navlabel">Next:</b> <a class="sectref" href="pop3-objects.html">11.9.1 POP3 Objects</A>
<hr>
<span class="release-info">Release 2.2, documentation updated on December 21, 2001.</span>
</DIV>
<!--End of Navigation Panel-->
<ADDRESS>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</ADDRESS>
</BODY>
</HTML>