IP : 3.131.142.67Hostname : server86.web-hosting.comKernel : Linux server86.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
servlmvm/
public_html/
ad917/
./
../
wp-includes/
class-pop3.php/
/
<?php /** * mail_fetch/setup.php * * Copyright (c) 1999-2011 CDI (cdi@thewebmasters.net) All Rights Reserved * Modified by Philippe Mingo 2001-2009 mingo@rotedic.com * An RFC 1939 compliant wrapper class for the POP3 protocol. * * Licensed under the GNU GPL. For full terms see the file COPYING. * * POP3 class * * @copyright 1999-2011 The SquirrelMail Project Team * @license https://opensource.org/licenses/gpl-license.php GNU Public License * @package plugins * @subpackage mail_fetch */
class POP3 { var $ERROR = ''; // Error string.
var $TIMEOUT = 60; // Default timeout before giving up on a // network operation.
var $COUNT = -1; // Mailbox msg count
var $BUFFER = 512; // Socket buffer for socket fgets() calls. // Per RFC 1939 the returned line a POP3 // server can send is 512 bytes.
var $FP = ''; // The connection to the server's // file descriptor
var $MAILSERVER = ''; // Set this to hard code the server name
var $DEBUG = FALSE; // set to true to echo pop3 // commands and responses to error_log // this WILL log passwords!
var $BANNER = ''; // Holds the banner returned by the // pop server - used for apop()
var $ALLOWAPOP = FALSE; // Allow or disallow apop() // This must be set to true // manually
/** * PHP5 constructor. */ function __construct ( $server = '', $timeout = '' ) { settype($this->BUFFER,"integer"); if( !empty($server) ) { // Do not allow programs to alter MAILSERVER // if it is already specified. They can get around // this if they -really- want to, so don't count on it. if(empty($this->MAILSERVER)) $this->MAILSERVER = $server; } if(!empty($timeout)) { settype($timeout,"integer"); $this->TIMEOUT = $timeout; if(function_exists("set_time_limit")){ // Extends POP3 request timeout to specified TIMEOUT property. set_time_limit($timeout); } } return true; }
function update_timer () { if(function_exists("set_time_limit")){ // Allows additional extension of POP3 request timeout to specified TIMEOUT property when update_timer is called. set_time_limit($this->TIMEOUT); } return true; }
function connect ($server, $port = 110) { // Opens a socket to the specified server. Unless overridden, // port defaults to 110. Returns true on success, false on fail
// If MAILSERVER is set, override $server with its value.
function apop ($login,$pass) { // Attempts an APOP login. If this fails, it'll // try a standard login. YOUR SERVER MUST SUPPORT // THE USE OF THE APOP COMMAND! // (apop is optional per rfc1939)
function login ($login = "", $pass = "") { // Sends both user and pass. Returns # of msgs in mailbox or // false on failure (or -1, if the error occurs while getting // the number of messages.)
function top ($msgNum, $numLines = "0") { // Gets the header and first $numLines of the msg body // returns data in an array with each returned line being // an array element. If $numLines is empty, returns // only the header information, and none of the body.
function pop_list ($msgNum = "") { // If called with an argument, returns that msgs' size in octets // No argument returns an associative array of undeleted // msg numbers and their sizes in octets
function last ( $type = "count" ) { // Returns the highest msg number in the mailbox. // returns -1 on error, 0+ on success, if type != count // results in a popstat() call (2 element array returned)
function reset () { // Resets the status of the remote server. This includes // resetting the status of ALL msgs to not be deleted. // This method automatically closes the connection to the server.
if(!isset($this->FP)) { $this->ERROR = "POP3 reset: " . _("No connection to server"); return false; } $reply = $this->send_cmd("RSET"); if(!$this->is_ok($reply)) { // The POP3 RSET command -never- gives a -ERR // response - if it ever does, something truly // wild is going on.
function send_cmd ( $cmd = "" ) { // Sends a user defined command string to the // POP server and returns the results. Useful for // non-compliant or custom POP servers. // Do NOT include the \r\n as part of your command // string - it will be appended automatically.
// The return value is a standard fgets() call, which // will read up to $this->BUFFER bytes of data, until it // encounters a new line, or EOF, whichever happens first.
// This method works best if $cmd responds with only // one line of data.
function uidl ($msgNum = "") { // Returns the UIDL of the msg specified. If called with // no arguments, returns an associative array where each // undeleted msg num is a key, and the msg's uidl is the element // Array element 0 will contain the total number of msgs