pfeifferNet

SMTP_Mailer
in package

Set use of SMTP mail.

Initialises phpmailer to use SMTP and specifies the host connection parameters. The following constants MUST be defined in wp-config.php:

  • SMTP_HOST The hostname of the mail server.
  • SMTP_PORT SMTP port number - likely to be 25, 465 or 587.
  • SMTP_SECURE Encryption system to use - ssl or tls.
  • SMTP_AUTH Use SMTP authentication (true|false).
  • SMTP_DEBUG Set to 1 or 2 for debugging purposes only.
  • SMTP_DEBUG_OUTPUT Set to error_log to place debug ouptut into standard log file.
Tags
since
1.0.0
since
5.5.0

Inherit standard singleton class.

since
5.11.0

Deprecated global singleton.

Table of Contents

Properties

$instances  : array<string|int, object>
The array of instances of this class and sub-classes.
$smtp_from  : string
SMTP sender.
$smtp_from_name  : string
SMTP sender name.
$smtp_password  : string
SMTP user password.
$smtp_user  : string
SMTP user name.

Methods

get_instance()  : object
Creates and/or returns the instance of this class.
set_smtp()  : void
Connect wp_mail to the SMTP server.
__construct()  : void
Initialise the class.

Properties

$instances

The array of instances of this class and sub-classes.

protected static array<string|int, object> $instances = array()
Tags
since
5.11.0

$smtp_from_name

SMTP sender name.

protected string $smtp_from_name = ''
Tags
since
6.3.0

$smtp_password

SMTP user password.

protected string $smtp_password = ''
Tags
since
6.3.0

$smtp_user

SMTP user name.

protected string $smtp_user = ''
Tags
since
6.3.0

Methods

get_instance()

Creates and/or returns the instance of this class.

public static get_instance() : object
Tags
since
5.11.0
Return values
object

The instance of this class.


        
On this page

Search results