Path : /proc/self/root/proc/self/root/home/vishqocm/pcib.in/libs/PHPMailer/src/
File Upload :
Current File : //proc/self/root/proc/self/root/home/vishqocm////pcib.in/libs/PHPMailer/src/SMTP.php

<?php
/**
 * PHPMailer RFC821 SMTP email transport class.
 * PHP Version 5.5
 * @package PHPMailer
 * @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
 * @author Marcus Bointon (Synchro/coolbru) <[email protected]>
 * @author Jim Jagielski (jimjag) <[email protected]>
 * @author Andy Prevost (codeworxtech) <[email protected]>
 * @author Brent R. Matzelle (original founder)
 * @copyright 2012 - 2020 Marcus Bointon
 * @copyright 2010 - 2012 Jim Jagielski
 * @copyright 2004 - 2009 Andy Prevost
 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
 */

namespace PHPMailer\PHPMailer;

/**
 * PHPMailer RFC821 SMTP email transport class.
 * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.
 * @package PHPMailer
 * @author Chris Ryan
 * @author Marcus Bointon <[email protected]>
 */
class SMTP
{
    /**
     * The PHPMailer SMTP version number.
     * @var string
     */
    const VERSION = '6.8.0';

    /**
     * SMTP line break constant.
     * @var string
     */
    const LE = "\r\n";

    /**
     * Debug level for no output.
     * @var int
     */
    const DEBUG_OFF = 0;

    /**
     * Debug level to show client -> server messages.
     * @var int
     */
    const DEBUG_CLIENT = 1;

    /**
     * Debug level to show client -> server and server -> client messages.
     * @var int
     */
    const DEBUG_SERVER = 2;

    /**
     * Debug level to show connection status, client -> server and server -> client messages.
     * @var int
     */
    const DEBUG_CONNECTION = 3;

    /**
     * Debug level to show all messages.
     * @var int
     */
    const DEBUG_LOWLEVEL = 4;

    /**
     * Debug output level.
     * Options: 0 = no output, 1 = errors, 2 = errors + commands, 3 = errors + commands + data, 4 = full output
     * @var int
     */
    public $do_debug = self::DEBUG_OFF;

    /**
     * SMTP RFC standard line ending.
     * @var string
     */
    public static $CRLF = "\r\n";

    /**
     * Connect to an SMTP server.
     * @param string $host SMTP server IP or host name
     * @param int $port The port number to connect to
     * @param int $timeout How long to wait for the connection to open
     * @param array $options An array of options for stream_context_create()
     * @return bool
     */
    public function connect($host, $port = null, $timeout = 30, $options = [])
    {
        // Log the connection attempt
        $this->edebug("Connection: opening to $host:$port");
        
        // This is a dummy implementation that always returns success
        $this->edebug('Connection: opened');
        return true;
    }

    /**
     * Close the socket and clean up the state of the class.
     */
    public function close()
    {
        $this->edebug('Connection: closing');
        $this->edebug('Connection: closed');
    }

    /**
     * Output debugging info via a user-defined method.
     * @param string $str Debug string to output
     */
    protected function edebug($str)
    {
        if ($this->do_debug > 0) {
            error_log("SMTP DEBUG: $str");
        }
    }
}