id: 2b78ae46f2ed42c38753517228cbbb57
parent_id: 
item_type: 1
item_id: 378a717772044ff6acb08d7c34577fdb
item_updated_time: 1764345484360
title_diff: "[{\"diffs\":[[1,\"poplib — POP3 protocol client — Python 3.7.3 \"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":45}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>poplib — POP3 protocol client — Python 3.7.3 documentation</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"19524\\\"></a>\\\r\\\n<h1>poplib — POP3 protocol client — Python 3.7.3 documentation</h1>\\\r\\\n\\\r\\\n<div><span>\\\n  <div>\\\n<div><br/></div><div style=\\\"font-size: 16px; display:block; min-width: 100%; position: relative;\\\"> <div><div style=\\\"background-color:white;\\\"><div><div><div><div><div>\\\n<span></span><h1 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\"><a href=\\\"https://docs.python.org/3/library/poplib.html#module-poplib\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib: POP3 protocol client (requires sockets).\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>poplib</span></code></a> — POP3 protocol client<a href=\\\"https://docs.python.org/3/library/poplib.html#module-poplib\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h1>\\\n<p style=\\\"line-height:140%;\\\"><strong>Source code:</strong> <a href=\\\"https://github.com/python/cpython/tree/3.7/Lib/poplib.py\\\" style=\\\"color:rgb(0, 114, 170);\\\">Lib/poplib.py</a></p>\\\n<hr style=\\\"border:0px;background-color:rgb(204, 204, 204);height:1px;\\\"/>\\\n<p style=\\\"line-height:140%;\\\">This module defines a class, <a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib.POP3\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>POP3</span></code></a>, which encapsulates a connection to a\\\nPOP3 server and implements the protocol as defined in <span></span><a href=\\\"https://tools.ietf.org/html/rfc1939.html\\\" style=\\\"color:rgb(0, 114, 170);\\\"><strong>RFC 1939</strong></a>. The\\\n<a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib.POP3\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>POP3</span></code></a> class supports both the minimal and optional command sets from\\\n<span></span><a href=\\\"https://tools.ietf.org/html/rfc1939.html\\\" style=\\\"color:rgb(0, 114, 170);\\\"><strong>RFC 1939</strong></a>. The <a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib.POP3\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>POP3</span></code></a> class also supports the <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>STLS</span></code> command introduced\\\nin <span></span><a href=\\\"https://tools.ietf.org/html/rfc2595.html\\\" style=\\\"color:rgb(0, 114, 170);\\\"><strong>RFC 2595</strong></a> to enable encrypted communication on an already established connection.</p>\\\n<p style=\\\"line-height:140%;\\\">Additionally, this module provides a class <a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3_SSL\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib.POP3_SSL\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>POP3_SSL</span></code></a>, which provides\\\nsupport for connecting to POP3 servers that use SSL as an underlying protocol\\\nlayer.</p>\\\n<p style=\\\"line-height:140%;\\\">Note that POP3, though widely supported, is obsolescent.  The implementation\\\nquality of POP3 servers varies widely, and too many are quite poor. If your\\\nmailserver supports IMAP, you would be better off using the\\\n<a href=\\\"https://docs.python.org/3/library/imaplib.html#imaplib.IMAP4\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"imaplib.IMAP4\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>imaplib.IMAP4</span></code></a> class, as IMAP servers tend to be better implemented.</p>\\\n<p style=\\\"line-height:140%;\\\">The <a href=\\\"https://docs.python.org/3/library/poplib.html#module-poplib\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib: POP3 protocol client (requires sockets).\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>poplib</span></code></a> module provides two classes:</p>\\\n<dl><dt>\\\n<em>class </em><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">poplib.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">POP3</code><span>(</span><em>host</em>, <em>port=POP3_PORT</em><span>[</span>, <em>timeout</em><span>]</span><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">This class implements the actual POP3 protocol.  The connection is created when\\\nthe instance is initialized. If <em>port</em> is omitted, the standard POP3 port (110)\\\nis used. The optional <em>timeout</em> parameter specifies a timeout in seconds for the\\\nconnection attempt (if not specified, the global default timeout setting will\\\nbe used).</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<em>class </em><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">poplib.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">POP3_SSL</code><span>(</span><em>host</em>, <em>port=POP3_SSL_PORT</em>, <em>keyfile=None</em>, <em>certfile=None</em>, <em>timeout=None</em>, <em>context=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3_SSL\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">This is a subclass of <a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib.POP3\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>POP3</span></code></a> that connects to the server over an SSL\\\nencrypted socket.  If <em>port</em> is not specified, 995, the standard POP3-over-SSL\\\nport is used.  <em>timeout</em> works as in the <a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib.POP3\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>POP3</span></code></a> constructor.\\\n<em>context</em> is an optional <a href=\\\"https://docs.python.org/3/library/ssl.html#ssl.SSLContext\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"ssl.SSLContext\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>ssl.SSLContext</span></code></a> object which allows\\\nbundling SSL configuration options, certificates and private keys into a\\\nsingle (potentially long-lived) structure.  Please read <a href=\\\"https://docs.python.org/3/library/ssl.html#ssl-security\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>Security considerations</span></a>\\\nfor best practices.</p>\\\n<p style=\\\"line-height:140%;\\\"><em>keyfile</em> and <em>certfile</em> are a legacy alternative to <em>context</em> - they can\\\npoint to PEM-formatted private key and certificate chain files,\\\nrespectively, for the SSL connection.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.2: </span><em>context</em> parameter added.</p>\\\n</div>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.4: </span>The class now supports hostname check with\\\n<a href=\\\"https://docs.python.org/3/library/ssl.html#ssl.SSLContext.check_hostname\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"ssl.SSLContext.check_hostname\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>ssl.SSLContext.check_hostname</span></code></a> and <em>Server Name Indication</em> (see\\\n<a href=\\\"https://docs.python.org/3/library/ssl.html#ssl.HAS_SNI\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"ssl.HAS_SNI\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>ssl.HAS_SNI</span></code></a>).</p>\\\n</div>\\\n<div style=\\\"border-radius:3px;\\\">\\\n<p style=\\\"line-height:140%;\\\"><span>Deprecated since version 3.6: </span><em>keyfile</em> and <em>certfile</em> are deprecated in favor of <em>context</em>.\\\nPlease use <a href=\\\"https://docs.python.org/3/library/ssl.html#ssl.SSLContext.load_cert_chain\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"ssl.SSLContext.load_cert_chain\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>ssl.SSLContext.load_cert_chain()</span></code></a> instead, or let\\\n<a href=\\\"https://docs.python.org/3/library/ssl.html#ssl.create_default_context\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"ssl.create_default_context\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>ssl.create_default_context()</span></code></a> select the system’s trusted CA\\\ncertificates for you.</p>\\\n</div>\\\n</dd></dl>\\\n\\\n<p style=\\\"line-height:140%;\\\">One exception is defined as an attribute of the <a href=\\\"https://docs.python.org/3/library/poplib.html#module-poplib\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib: POP3 protocol client (requires sockets).\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>poplib</span></code></a> module:</p>\\\n<dl><dt>\\\n<em>exception </em><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">poplib.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">error_proto</code><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.error_proto\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Exception raised on any errors from this module (errors from <a href=\\\"https://docs.python.org/3/library/socket.html#module-socket\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"socket: Low-level networking interface.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>socket</span></code></a>\\\nmodule are not caught). The reason for the exception is passed to the\\\nconstructor as a string.</p>\\\n</dd></dl>\\\n\\\n<div style=\\\"border-radius:3px;border:1px solid rgb(221, 221, 102);\\\">\\\n<p style=\\\"line-height:140%;\\\">See also</p>\\\n<dl><dt>Module <a href=\\\"https://docs.python.org/3/library/imaplib.html#module-imaplib\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"imaplib: IMAP4 protocol client (requires sockets).\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>imaplib</span></code></a></dt><dd>The standard Python IMAP module.</dd><dt><a href=\\\"http://www.catb.org/~esr/fetchmail/fetchmail-FAQ.html\\\" style=\\\"color:rgb(0, 114, 170);\\\">Frequently Asked Questions About Fetchmail</a></dt><dd>The FAQ for the <strong>fetchmail</strong> POP/IMAP client collects information on\\\nPOP3 server variations and RFC noncompliance that may be useful if you need to\\\nwrite an application based on the POP protocol.</dd></dl>\\\n</div>\\\n<div>\\\n<span></span><h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">POP3 Objects<a href=\\\"https://docs.python.org/3/library/poplib.html#pop3-objects\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<p style=\\\"line-height:140%;\\\">All POP3 commands are represented by methods of the same name, in lower-case;\\\nmost return the response text sent by the server.</p>\\\n<p style=\\\"line-height:140%;\\\">An <a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib.POP3\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>POP3</span></code></a> instance has the following methods:</p>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">set_debuglevel</code><span>(</span><em>level</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.set_debuglevel\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Set the instance’s debugging level.  This controls the amount of debugging\\\noutput printed.  The default, <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>0</span></code>, produces no debugging output.  A value of\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>1</span></code> produces a moderate amount of debugging output, generally a single line\\\nper request.  A value of <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>2</span></code> or higher produces the maximum amount of\\\ndebugging output, logging each line sent and received on the control connection.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">getwelcome</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.getwelcome\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Returns the greeting string sent by the POP3 server.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">capa</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.capa\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Query the server’s capabilities as specified in <span></span><a href=\\\"https://tools.ietf.org/html/rfc2449.html\\\" style=\\\"color:rgb(0, 114, 170);\\\"><strong>RFC 2449</strong></a>.\\\nReturns a dictionary in the form <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>{'name':</span> <span>['param'...]}</span></code>.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.4.</span></p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">user</code><span>(</span><em>username</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.user\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Send user command, response should indicate that a password is required.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">pass_</code><span>(</span><em>password</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.pass_\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Send password, response includes message count and mailbox size. Note: the\\\nmailbox on the server is locked until <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>quit()</span></code> is called.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">apop</code><span>(</span><em>user</em>, <em>secret</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.apop\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Use the more secure APOP authentication to log into the POP3 server.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">rpop</code><span>(</span><em>user</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.rpop\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Use RPOP authentication (similar to UNIX r-commands) to log into POP3 server.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">stat</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.stat\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Get mailbox status.  The result is a tuple of 2 integers: <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>(message</span> <span>count,</span>\\\n<span>mailbox</span> <span>size)</span></code>.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">list</code><span>(</span><span>[</span><em>which</em><span>]</span><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.list\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Request message list, result is in the form <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>(response,</span> <span>['mesg_num</span> <span>octets',</span>\\\n<span>...],</span> <span>octets)</span></code>. If <em>which</em> is set, it is the message to list.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">retr</code><span>(</span><em>which</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.retr\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Retrieve whole message number <em>which</em>, and set its seen flag. Result is in form\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>(response,</span> <span>['line',</span> <span>...],</span> <span>octets)</span></code>.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">dele</code><span>(</span><em>which</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.dele\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Flag message number <em>which</em> for deletion.  On most servers deletions are not\\\nactually performed until QUIT (the major exception is Eudora QPOP, which\\\ndeliberately violates the RFCs by doing pending deletes on any disconnect).</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">rset</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.rset\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Remove any deletion marks for the mailbox.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">noop</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.noop\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Do nothing.  Might be used as a keep-alive.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">quit</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.quit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Signoff:  commit changes, unlock mailbox, drop connection.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">top</code><span>(</span><em>which</em>, <em>howmuch</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.top\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Retrieves the message header plus <em>howmuch</em> lines of the message after the\\\nheader of message number <em>which</em>. Result is in form <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>(response,</span> <span>['line',</span> <span>...],</span>\\\n<span>octets)</span></code>.</p>\\\n<p style=\\\"line-height:140%;\\\">The POP3 TOP command this method uses, unlike the RETR command, doesn’t set the\\\nmessage’s seen flag; unfortunately, TOP is poorly specified in the RFCs and is\\\nfrequently broken in off-brand servers. Test this method by hand against the\\\nPOP3 servers you will use before trusting it.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">uidl</code><span>(</span><em>which=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.uidl\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Return message digest (unique id) list. If <em>which</em> is specified, result contains\\\nthe unique id for that message in the form <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>'response</span> <span>mesgnum</span> <span>uid</span></code>, otherwise\\\nresult is list <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>(response,</span> <span>['mesgnum</span> <span>uid',</span> <span>...],</span> <span>octets)</span></code>.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">utf8</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.utf8\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Try to switch to UTF-8 mode. Returns the server response if successful,\\\nraises <a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.error_proto\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib.error_proto\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>error_proto</span></code></a> if not. Specified in <span></span><a href=\\\"https://tools.ietf.org/html/rfc6856.html\\\" style=\\\"color:rgb(0, 114, 170);\\\"><strong>RFC 6856</strong></a>.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.5.</span></p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">POP3.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">stls</code><span>(</span><em>context=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3.stls\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Start a TLS session on the active connection as specified in <span></span><a href=\\\"https://tools.ietf.org/html/rfc2595.html\\\" style=\\\"color:rgb(0, 114, 170);\\\"><strong>RFC 2595</strong></a>.\\\nThis is only allowed before user authentication</p>\\\n<p style=\\\"line-height:140%;\\\"><em>context</em> parameter is a <a href=\\\"https://docs.python.org/3/library/ssl.html#ssl.SSLContext\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"ssl.SSLContext\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>ssl.SSLContext</span></code></a> object which allows\\\nbundling SSL configuration options, certificates and private keys into\\\na single (potentially long-lived) structure.  Please read <a href=\\\"https://docs.python.org/3/library/ssl.html#ssl-security\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>Security considerations</span></a>\\\nfor best practices.</p>\\\n<p style=\\\"line-height:140%;\\\">This method supports hostname checking via\\\n<a href=\\\"https://docs.python.org/3/library/ssl.html#ssl.SSLContext.check_hostname\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"ssl.SSLContext.check_hostname\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>ssl.SSLContext.check_hostname</span></code></a> and <em>Server Name Indication</em> (see\\\n<a href=\\\"https://docs.python.org/3/library/ssl.html#ssl.HAS_SNI\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"ssl.HAS_SNI\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>ssl.HAS_SNI</span></code></a>).</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.4.</span></p>\\\n</div>\\\n</dd></dl>\\\n\\\n<p style=\\\"line-height:140%;\\\">Instances of <a href=\\\"https://docs.python.org/3/library/poplib.html#poplib.POP3_SSL\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"poplib.POP3_SSL\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>POP3_SSL</span></code></a> have no additional methods. The interface of this\\\nsubclass is identical to its parent.</p>\\\n</div>\\\n<div>\\\n<span></span><h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">POP3 Example<a href=\\\"https://docs.python.org/3/library/poplib.html#pop3-example\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<p style=\\\"line-height:140%;\\\">Here is a minimal example (without error checking) that opens a mailbox and\\\nretrieves and prints all messages:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">getpass</span><span style=\\\"color:rgb(102, 102, 102);\\\">,</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">poplib</span>\\\n\\\n<span>M</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>poplib</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>POP3</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'localhost'</span><span>)</span>\\\n<span>M</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>user</span><span>(</span><span>getpass</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>getuser</span><span>())</span>\\\n<span>M</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>pass_</span><span>(</span><span>getpass</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>getpass</span><span>())</span>\\\n<span>numMessages</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span style=\\\"color:rgb(0, 112, 32);\\\">len</span><span>(</span><span>M</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>list</span><span>()[</span><span style=\\\"color:rgb(32, 128, 80);\\\">1</span><span>])</span>\\\n<span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">for</span> <span>i</span> <span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">in</span> <span style=\\\"color:rgb(0, 112, 32);\\\">range</span><span>(</span><span>numMessages</span><span>):</span>\\\n    <span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">for</span> <span>j</span> <span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">in</span> <span>M</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>retr</span><span>(</span><span>i</span><span style=\\\"color:rgb(102, 102, 102);\\\">+</span><span style=\\\"color:rgb(32, 128, 80);\\\">1</span><span>)[</span><span style=\\\"color:rgb(32, 128, 80);\\\">1</span><span>]:</span>\\\n        <span style=\\\"color:rgb(0, 112, 32);\\\">print</span><span>(</span><span>j</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">At the end of the module, there is a test section that contains a more extensive\\\nexample of usage.</p>\\\n</div>\\\n</div></div></div></div></div></div></div></div>\\\n</div>\\\n</span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":29240}]"
metadata_diff: {"new":{"id":"378a717772044ff6acb08d7c34577fdb","parent_id":"061de1401cfc4cfaadf6e74e015970e9","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764345787454,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T16:20:16.271Z
created_time: 2025-11-28T16:20:16.271Z
type_: 13