<commit_before><?php
/**
 * PHPMailer POP-Before-SMTP Authentication Class.
 * PHP Version 5
 * @package PHPMailer
 * @link https://github.com/PHPMailer/PHPMailer/
 * @author <NAME> (Synchro/coolbru) <<EMAIL>>
 * @author <NAME> (jimjag) <<EMAIL>>
 * @author <NAME> (codeworxtech) <<EMAIL>>
 * @author <NAME> (original founder)
 * @copyright 2012 - 2014 <NAME>
 * @copyright 2010 - 2012 <NAME>
 * @copyright 2004 - 2009 <NAME>
 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
 * @note This program is distributed in the hope that it will be useful - WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.
 */

/**
 * PHPMailer POP-Before-SMTP Authentication Class.
 * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication.
 * Does not support APOP.
 * @package PHPMailer
 * @author <NAME> (original author) <<EMAIL>>
 * @author <NAME> (Synchro/coolbru) <<EMAIL>>
 * @author <NAME> (jimjag) <<EMAIL>>
 * @author <NAME> (codeworxtech) <<EMAIL>>
 */
class POP3
{
    /**
     * The POP3 PHPMailer Version number.
     * @type string
     * @access public
     */
    public $Version = '5.2.9';

    /**
     * Default POP3 port number.
     * @type integer
     * @access public
     */
    public $POP3_PORT = 110;

    /**
     * Default timeout in seconds.
     * @type integer
     * @access public
     */
    public $POP3_TIMEOUT = 30;

    /**
     * POP3 Carriage Return + Line Feed.
     * @type string
     * @access public
     * @deprecated Use the constant instead
     */
    public $CRLF = "\r\n";

    /**
     * Debug display level.
     * Options: 0 = no, 1+ = yes
     * @type integer
     * @access public
     */
    public $do_debug = 0;

    /**
     * POP3 mail server hostname.
     * @type string
     * @access public
     */
    public $host;

    /**
     * POP3 port number.
     * @type integer
     * @access public
     */
    public $port;

    /**
     * POP3 Timeout Value in seconds.
     * @type integer
     * @access public
     */
    public $tval;

    /**
     * POP3 username
     * @type string
     * @access public
     */
    public $username;

    /**
     * POP3 password.
     * @type string
     * @access public
     */
    public $password;

    /**
     * Resource handle for the POP3 connection socket.
     * @type resource
     * @access private
     */
    private $pop_conn;

    /**
     * Are we connected?
     * @type boolean
     * @access private
     */
    private $connected = false;

    /**
     * Error container.
     * @type array
     * @access private
     */
    private $errors = array();

    /**
     * Line break constant
     */
    const CRLF = "\r\n";

    /**
     * Simple static wrapper for all-in-one POP before SMTP
     * @param $host
     * @param integer|boolean $port The port number to connect to
     * @param integer|boolean $timeout The timeout value
     * @param string $username
     * @param string $password
     * @param integer $debug_level
     * @return boolean
     */
    public static function popBeforeSmtp(
        $host,
        $port = false,
        $tval = false,
        $username = '',
        $password = '',
        $debug_level = 0
    ) {
        $pop = new POP3;
        return $pop->authorise($host, $port, $tval, $username, $password, $debug_level);
    }

    /**
     * Authenticate with a POP3 server.
     * A connect, login, disconnect sequence
     * appropriate for POP-before SMTP authorisation.<commit_msg>Fix param naming, see #398<commit_after><?php
/**
 * PHPMailer POP-Before-SMTP Authentication Class.
 * PHP Version 5
 * @package PHPMailer
 * @link https://github.com/PHPMailer/PHPMailer/
 * @author <NAME> (Synchro/coolbru) <<EMAIL>>
 * @author <NAME> (jimjag) <<EMAIL>>
 * @author <NAME> (codeworxtech) <<EMAIL>>
 * @author <NAME> (original founder)
 * @copyright 2012 - 2014 <NAME>
 * @copyright 2010 - 2012 <NAME>
 * @copyright 2004 - 2009 <NAME>
 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
 * @note This program is distributed in the hope that it will be useful - WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.
 */

/**
 * PHPMailer POP-Before-SMTP Authentication Class.
 * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication.
 * Does not support APOP.
 * @package PHPMailer
 * @author <NAME> (original author) <<EMAIL>>
 * @author <NAME> (Synchro/coolbru) <<EMAIL>>
 * @author <NAME> (jimjag) <<EMAIL>>
 * @author <NAME> (codeworxtech) <<EMAIL>>
 */
class POP3
{
    /**
     * The POP3 PHPMailer Version number.
     * @type string
     * @access public
     */
    public $Version = '5.2.9';

    /**
     * Default POP3 port number.
     * @type integer
     * @access public
     */
    public $POP3_PORT = 110;

    /**
     * Default timeout in seconds.
     * @type integer
     * @access public
     */
    public $POP3_TIMEOUT = 30;

    /**
     * POP3 Carriage Return + Line Feed.
     * @type string
     * @access public
     * @deprecated Use the constant instead
     */
    public $CRLF = "\r\n";

    /**
     * Debug display level.
     * Options: 0 = no, 1+ = yes
     * @type integer
     * @access public
     */
    public $do_debug = 0;

    /**
     * POP3 mail server hostname.
     * @type string
     * @access public
     */
    public $host;

    /**
     * POP3 port number.
     * @type integer
     * @access public
     */
    public $port;

    /**
     * POP3 Timeout Value in seconds.
     * @type integer
     * @access public
     */
    public $tval;

    /**
     * POP3 username
     * @type string
     * @access public
     */
    public $username;

    /**
     * POP3 password.
     * @type string
     * @access public
     */
    public $password;

    /**
     * Resource handle for the POP3 connection socket.
     * @type resource
     * @access private
     */
    private $pop_conn;

    /**
     * Are we connected?
     * @type boolean
     * @access private
     */
    private $connected = false;

    /**
     * Error container.
     * @type array
     * @access private
     */
    private $errors = array();

    /**
     * Line break constant
     */
    const CRLF = "\r\n";

    /**
     * Simple static wrapper for all-in-one POP before SMTP
     * @param $host
     * @param integer|boolean $port The port number to connect to
     * @param integer|boolean $timeout The timeout value
     * @param string $username
     * @param string $password
     * @param integer $debug_level
     * @return boolean
     */
    public static function popBeforeSmtp(
        $host,
        $port = false,
        $timeout = false,
        $username = '',
        $password = '',
        $debug_level = 0
    ) {
        $pop = new POP3;
        return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level);
    }

    /**
     * Authenticate with a POP3 server.
     * A connect, login, disconnect sequence
     * appropriate for POP-before SMTP authorisation.
{'fraction_non_alphanumeric': 0.1250175192711983, 'fraction_numerical': 0.015837421163279606, 'mean_word_length': 2.1229759299781183, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3339921', 'n_tokens_mistral': 2335, 'n_tokens_neox': 2173, 'n_words': 679}