Email_Sent_Notice
in package
Class to send notice of sent emails to site administrator.
Tags
Table of Contents
Constants
- CONTENT = 'email-sent-notice.php'
- Emails sent notification email partial.
Properties
- $content : string
- The fully qualified path to the email sent notice content partial.
- $mail_args : array<string|int, mixed>
- The array of arguments for the notification email.
Methods
- __construct() : void
- Initialise the class.
- send() : bool|WP_Error
- Send notice of number of emails sent and their subject.
- get_message() : string
- Return message with number of emails sent and their subject.
Constants
CONTENT
Emails sent notification email partial.
protected
string
CONTENT
= 'email-sent-notice.php'
Tags
Properties
$content
The fully qualified path to the email sent notice content partial.
protected
string
$content
= ''
Tags
$mail_args
The array of arguments for the notification email.
protected
array<string|int, mixed>
$mail_args
= array('to' => array(), 'subject' => '', 'body' => '', 'is_internal' => true)
{ The email arguments. @type string[] $to The email address(es) of the intended recipient of the email. @type string $subject The subject of the email. @type string $body The content of the email. @type bool $is_internal Flag to indicate that eamil is internal and not intended for external users. }
Tags
Methods
__construct()
Initialise the class.
public
__construct(int $emails_sent, string $sent_email_subject) : void
Parameters
- $emails_sent : int
-
The number of emails sent.
- $sent_email_subject : string
-
The subject of the sent emails.
Tags
send()
Send notice of number of emails sent and their subject.
public
send() : bool|WP_Error
Tags
Return values
bool|WP_Errorget_message()
Return message with number of emails sent and their subject.
protected
get_message(int $emails_sent, string $sent_email_subject) : string
Parameters
- $emails_sent : int
-
The number of emails sent.
- $sent_email_subject : string
-
The subject of the sent emails.
Tags
Return values
string —The markup for the sent notice message.