wppaste
WordPress

POP3

Source
wp-includes/class-pop3.php:19
mail_fetch/setup.php

Description

Copyright (c) 1999-2011 CDI ([email protected]) All Rights Reserved Modified by Philippe Mingo 2001-2009 [email protected] An RFC 1939 compliant wrapper class for the POP3 protocol.

Licensed under the GNU GPL. For full terms see the file COPYING.

POP3 class

Compatibility

WordPress
core
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 9

$ERRORpublic
$TIMEOUTpublic
$COUNTpublic
$BUFFERpublic
$FPpublic
$MAILSERVERpublic
$DEBUGpublic
$BANNERpublic
$ALLOWAPOPpublic

Methods · 21

Source code

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;            // Extend POP3 request timeout to the specified TIMEOUT property.            if(function_exists("set_time_limit")){                set_time_limit($timeout);            }        }        return true;    } 	/**	 * PHP4 constructor.	 */	public function POP3( $server = '', $timeout = '' ) {		self::__construct( $server, $timeout );	}     function update_timer () {        // Extend POP3 request timeout to the specified TIMEOUT property.        if(function_exists("set_time_limit")){            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.     if (!isset($port) || !$port) {$port = 110;}        if(!empty($this->MAILSERVER))            $server = $this->MAILSERVER;         if(empty($server)){            $this->ERROR = "POP3 connect: " . _("No server specified");            unset($this->FP);            return false;

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/class-pop3.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.