pfeifferNet

Email_Contact_Request extends System_Email
in package

Handle sending contact requests to administrator.

Tags
since
1.0.0
since
5.5.0

Refactor to move form handling to separate class.

since
5.9.0

Uses system email framework.

uses
System_Email
used-by
Form_Contact::__construct()

Table of Contents

Constants

CONTENT  = 'email-contact-request.php'
Contact notification email partial filename.

Properties

$content  : string
Fully qualified path to the email content partial.
$instances  : array<string|int, object>
The array of instances of this class and sub-classes.
$mail_args  : array<string|int, mixed>
The array of arguments for the email.

Methods

get_instance()  : object
Creates and/or returns the instance of this class.
is_send()  : bool
Filter and set the send email flag.
send()  : WP_Error
Send the contact request email.
__construct()  : mixed
Initialise the class.

Constants

CONTENT

Contact notification email partial filename.

protected string CONTENT = 'email-contact-request.php'
Tags
since
5.3.0

Properties

$content

Fully qualified path to the email content partial.

protected string $content = ''
Tags
since
5.9.0

$instances

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

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

$mail_args

The array of arguments for the email.

protected array<string|int, mixed> $mail_args = array('to' => array(), 'cc' => array(), 'bcc' => array(), 'subject' => '', 'body' => '', 'is_internal' => false)

{ The email arguments. @type string[] $to The email address(es) of the recipients of the email. @type string[] $cc Optional. The email address(es) of the cc recipients of the email. @type string[] $bcc Optional. The email address(es) of the bcc recipients of the email. * @type string $subject The subject of the email. @type string $body The email content. @type bool $is_internal Flag to indicate that eamil is internal and not intended for external users. }

Tags
since
5.9.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.

is_send()

Filter and set the send email flag.

public is_send(array<string|int, mixed> ...$args) : bool
Parameters
$args : array<string|int, mixed>

A variable set of arguments.

Tags
since
5.9.0
Return values
bool

The send email flag.

send()

Send the contact request email.

public send(WP_Error $errors, array<string|int, mixed> $post_vars, array<string|int, mixed> $server_vars) : WP_Error
Parameters
$errors : WP_Error

The WP_Error object to use if errors.

$post_vars : array<string|int, mixed>

The sanitised $_POST arguments.

$server_vars : array<string|int, mixed>

The sanitised $_SERVER arguments.

Tags
since
1.4.0
since
5.5.0

Made this a HTML email.

since
6.3.0

Use the Settings class.

uses
Settings::get()
used-by
Form_Contact::do_submission()
Return values
WP_Error

The maybe modified error messages.

__construct()

Initialise the class.

protected __construct() : mixed
Tags
since
5.7.0

        
On this page

Search results