wppaste
WordPress

SMTP

Source
wp-includes/PHPMailer/SMTP.php:31
PHPMailer RFC821 SMTP email transport class.

Description

Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.

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 · 14

$do_debugintpublic
Debug output level.
$Debugoutputstring|callable|Psr\Log\LoggerInterfacepublic
How to handle debug output.
$do_verpboolpublic
Whether to use VERP.
$do_smtputf8boolpublic
Whether to use SMTPUTF8.
$Timeoutintpublic
The timeout value for connection, in seconds.
$Timelimitintpublic
How long to wait for commands to complete, in seconds.
$smtp_transaction_id_patternsstring[]protected
Patterns to extract an SMTP transaction id from reply to a DATA command.
$xclient_allowed_attributesarraypublic static
Allowed SMTP XCLIENT attributes.
$last_smtp_transaction_idstring|bool|nullprotected
The last transaction ID issued in response to a DATA command, if one was detected.
$smtp_connPHPMailer\PHPMailer\?resourceprotected
The socket for the server connection.
$errorarrayprotected
Error information, if any, for the last SMTP command.
$helo_rplystring|nullprotected
The reply the server sent to us for HELO.
$server_capsarray|nullprotected
The set of SMTP extensions sent in reply to EHLO command.
$last_replystringprotected
The most recent reply received from the server.

Methods · 43

Source code

class SMTP{    /**     * The PHPMailer SMTP version number.     *     * @var string     * @deprecated This constant will be removed in PHPMailer 8.0. Use `PHPMailer::VERSION` instead.     */    const VERSION = '7.1.1';     /**     * SMTP line break constant.     *     * @var string     */    const LE = "\r\n";     /**     * The SMTP port to use if one is not specified.     *     * @var int     */    const DEFAULT_PORT = 25;     /**     * The SMTPs port to use if one is not specified.     *     * @var int     */    const DEFAULT_SECURE_PORT = 465;     /**     * The maximum line length allowed by RFC 5321 section 4.5.3.1.6,     * *excluding* a trailing CRLF break.     *     * @see https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1.6     *     * @var int     */    const MAX_LINE_LENGTH = 998;     /**     * The maximum line length allowed for replies in RFC 5321 section 4.5.3.1.5,     * *including* a trailing CRLF line break.     *     * @see https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1.5     *     * @var int     */    const MAX_REPLY_LENGTH = 512;     /**     * 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;     /**

Changelog

3 changes between 6.7.7 and 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.

7.0.4
Method iterateLines() added.verified against source
6.9.7
Method setSMTPUTF8() added.verified against source
6.9.7
Method getSMTPUTF8() added.verified against source

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/PHPMailer/SMTP.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.