{
    "content": [
        {
            "type": "text",
            "text": "# Net::POP3 (perldoc)\n\n## NAME\n\nNet::POP3 - Post Office Protocol 3 Client class (RFC1939)\n\n## SYNOPSIS\n\nuse Net::POP3;\n# Constructors\n$pop = Net::POP3->new('pop3host');\n$pop = Net::POP3->new('pop3host', Timeout => 60);\n$pop = Net::POP3->new('pop3host', SSL => 1, Timeout => 60);\nif ($pop->login($username, $password) > 0) {\nmy $msgnums = $pop->list; # hashref of msgnum => size\nforeach my $msgnum (keys %$msgnums) {\nmy $msg = $pop->get($msgnum);\nprint @$msg;\n$pop->delete($msgnum);\n}\n}\n$pop->quit;\n\n## DESCRIPTION\n\nThis module implements a client interface to the POP3 protocol, enabling a perl5 application to\ntalk to POP3 servers. This documentation assumes that you are familiar with the POP3 protocol\ndescribed in RFC1939. With IO::Socket::SSL installed it also provides support for implicit and\nexplicit TLS encryption, i.e. POP3S or POP3+STARTTLS.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (3 subsections)\n- **EXPORTS**\n- **KNOWN BUGS**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT**\n- **LICENCE**\n- **VERSION**\n- **DATE**\n- **HISTORY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::POP3",
        "section": "",
        "mode": "perldoc",
        "summary": "Net::POP3 - Post Office Protocol 3 Client class (RFC1939)",
        "synopsis": "use Net::POP3;\n# Constructors\n$pop = Net::POP3->new('pop3host');\n$pop = Net::POP3->new('pop3host', Timeout => 60);\n$pop = Net::POP3->new('pop3host', SSL => 1, Timeout => 60);\nif ($pop->login($username, $password) > 0) {\nmy $msgnums = $pop->list; # hashref of msgnum => size\nforeach my $msgnum (keys %$msgnums) {\nmy $msg = $pop->get($msgnum);\nprint @$msg;\n$pop->delete($msgnum);\n}\n}\n$pop->quit;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": [
                    {
                        "name": "Class Methods",
                        "lines": 33
                    },
                    {
                        "name": "Object Methods",
                        "lines": 109
                    },
                    {
                        "name": "Notes",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "EXPORTS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "KNOWN BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "LICENCE",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DATE",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Net::POP3 - Post Office Protocol 3 Client class (RFC1939)\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Net::POP3;\n\n# Constructors\n$pop = Net::POP3->new('pop3host');\n$pop = Net::POP3->new('pop3host', Timeout => 60);\n$pop = Net::POP3->new('pop3host', SSL => 1, Timeout => 60);\n\nif ($pop->login($username, $password) > 0) {\nmy $msgnums = $pop->list; # hashref of msgnum => size\nforeach my $msgnum (keys %$msgnums) {\nmy $msg = $pop->get($msgnum);\nprint @$msg;\n$pop->delete($msgnum);\n}\n}\n\n$pop->quit;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module implements a client interface to the POP3 protocol, enabling a perl5 application to\ntalk to POP3 servers. This documentation assumes that you are familiar with the POP3 protocol\ndescribed in RFC1939. With IO::Socket::SSL installed it also provides support for implicit and\nexplicit TLS encryption, i.e. POP3S or POP3+STARTTLS.\n\nA new Net::POP3 object must be created with the *new* method. Once this has been done, all POP3\ncommands are accessed via method calls on the object.\n\nThe Net::POP3 class is a subclass of Net::Cmd and (depending on avaibility) of IO::Socket::IP,\nIO::Socket::INET6 or IO::Socket::INET.\n",
                "subsections": [
                    {
                        "name": "Class Methods",
                        "content": "\"new([$host][, %options])\"\nThis is the constructor for a new Net::POP3 object. $host is the name of the remote host to\nwhich an POP3 connection is required.\n\n$host is optional. If $host is not given then it may instead be passed as the \"Host\" option\ndescribed below. If neither is given then the \"POP3Hosts\" specified in \"Net::Config\" will\nbe used.\n\n%options are passed in a hash like fashion, using key and value pairs. Possible options are:\n\nHost - POP3 host to connect to. It may be a single scalar, as defined for the \"PeerAddr\"\noption in IO::Socket::INET, or a reference to an array with hosts to try in turn. The \"host\"\nmethod will return the value which was used to connect to the host.\n\nPort - port to connect to. Default - 110 for plain POP3 and 995 for POP3s (direct SSL).\n\nSSL - If the connection should be done from start with SSL, contrary to later upgrade with\n\"starttls\". You can use SSL arguments as documented in IO::Socket::SSL, but it will usually\nuse the right arguments already.\n\nLocalAddr and LocalPort - These parameters are passed directly to IO::Socket to allow\nbinding the socket to a specific local address and port. For compatibility with older\nversions ResvPort can be used instead of LocalPort.\n\nDomain - This parameter is passed directly to IO::Socket and makes it possible to enforce\nIPv4 connections even if IO::Socket::IP is used as super class. Alternatively Family can be\nused.\n\nTimeout - Maximum time, in seconds, to wait for a response from the POP3 server (default:\n120)\n\nDebug - Enable debugging information\n"
                    },
                    {
                        "name": "Object Methods",
                        "content": "Unless otherwise stated all methods return either a *true* or *false* value, with *true* meaning\nthat the operation was a success. When a method states that it returns a value, failure will be\nreturned as *undef* or an empty list.\n\n\"Net::POP3\" inherits from \"Net::Cmd\" so methods defined in \"Net::Cmd\" may be used to send\ncommands to the remote POP3 server in addition to the methods documented here.\n\n\"host()\"\nReturns the value used by the constructor, and passed to IO::Socket::INET, to connect to the\nhost.\n\n\"auth($username, $password)\"\nAttempt SASL authentication.\n\n\"user($user)\"\nSend the USER command.\n\n\"pass($pass)\"\nSend the PASS command. Returns the number of messages in the mailbox.\n\n\"login([$user[, $pass]])\"\nSend both the USER and PASS commands. If $pass is not given the \"Net::POP3\" uses\n\"Net::Netrc\" to lookup the password using the host and username. If the username is not\nspecified then the current user name will be used.\n\nReturns the number of messages in the mailbox. However if there are no messages on the\nserver the string \"0E0\" will be returned. This is will give a true value in a boolean\ncontext, but zero in a numeric context.\n\nIf there was an error authenticating the user then *undef* will be returned.\n\n\"starttls(%sslargs)\"\nUpgrade existing plain connection to SSL. You can use SSL arguments as documented in\nIO::Socket::SSL, but it will usually use the right arguments already.\n\n\"apop([$user[, $pass]])\"\nAuthenticate with the server identifying as $user with password $pass. Similar to \"login\",\nbut the password is not sent in clear text.\n\nTo use this method you must have the Digest::MD5 or the MD5 module installed, otherwise this\nmethod will return *undef*.\n\n\"banner()\"\nReturn the sever's connection banner\n\n\"capa()\"\nReturn a reference to a hash of the capabilities of the server. APOP is added as a pseudo\ncapability. Note that I've been unable to find a list of the standard capability values, and\nsome appear to be multi-word and some are not. We make an attempt at intelligently parsing\nthem, but it may not be correct.\n\n\"capabilities()\"\nJust like capa, but only uses a cache from the last time we asked the server, so as to avoid\nasking more than once.\n\n\"top($msgnum[, $numlines])\"\nGet the header and the first $numlines of the body for the message $msgnum. Returns a\nreference to an array which contains the lines of text read from the server.\n\n\"list([$msgnum])\"\nIf called with an argument the \"list\" returns the size of the message in octets.\n\nIf called without arguments a reference to a hash is returned. The keys will be the\n$msgnum's of all undeleted messages and the values will be their size in octets.\n\n\"get($msgnum[, $fh])\"\nGet the message $msgnum from the remote mailbox. If $fh is not given then get returns a\nreference to an array which contains the lines of text read from the server. If $fh is given\nthen the lines returned from the server are printed to the filehandle $fh.\n\n\"getfh($msgnum)\"\nAs per get(), but returns a tied filehandle. Reading from this filehandle returns the\nrequested message. The filehandle will return EOF at the end of the message and should not\nbe reused.\n\n\"last()\"\nReturns the highest $msgnum of all the messages accessed.\n\n\"popstat()\"\nReturns a list of two elements. These are the number of undeleted elements and the size of\nthe mbox in octets.\n\n\"ping($user)\"\nReturns a list of two elements. These are the number of new messages and the total number of\nmessages for $user.\n\n\"uidl([$msgnum])\"\nReturns a unique identifier for $msgnum if given. If $msgnum is not given \"uidl\" returns a\nreference to a hash where the keys are the message numbers and the values are the unique\nidentifiers.\n\n\"delete($msgnum)\"\nMark message $msgnum to be deleted from the remote mailbox. All messages that are marked to\nbe deleted will be removed from the remote mailbox when the server connection closed.\n\n\"reset()\"\nReset the status of the remote POP3 server. This includes resetting the status of all\nmessages to not be deleted.\n\n\"quit()\"\nQuit and close the connection to the remote POP3 server. Any messages marked as deleted will\nbe deleted from the remote mailbox.\n\n\"caninet6()\"\nReturns whether we can use IPv6.\n\n\"canssl()\"\nReturns whether we can use SSL.\n"
                    },
                    {
                        "name": "Notes",
                        "content": "If a \"Net::POP3\" object goes out of scope before \"quit\" method is called then the \"reset\" method\nwill called before the connection is closed. This means that any messages marked to be deleted\nwill not be.\n"
                    }
                ]
            },
            "EXPORTS": {
                "content": "*None*.\n",
                "subsections": []
            },
            "KNOWN BUGS": {
                "content": "See <https://rt.cpan.org/Dist/Display.html?Status=Active&Queue=libnet>.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Net::Netrc, Net::Cmd, IO::Socket::SSL.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Graham Barr <gbarr@pobox.com <mailto:gbarr@pobox.com>>.\n\nSteve Hay <shay@cpan.org <mailto:shay@cpan.org>> is now maintaining libnet as of version\n1.2202.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (C) 1995-2004 Graham Barr. All rights reserved.\n\nCopyright (C) 2013-2016, 2020 Steve Hay. All rights reserved.\n",
                "subsections": []
            },
            "LICENCE": {
                "content": "This module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself, i.e. under the terms of either the GNU General Public License or the Artistic\nLicense, as specified in the LICENCE file.\n",
                "subsections": []
            },
            "VERSION": {
                "content": "Version 3.13\n",
                "subsections": []
            },
            "DATE": {
                "content": "23 Dec 2020\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "See the Changes file.\n",
                "subsections": []
            }
        }
    }
}