Skip to content
Docs
Get RestroPress

Filter

rpress_email_headers

Updated
On this page

Filters the headers passed to wp_mail for a RestroPress email.

Applied at the end of RPRESS_Emails::get_headers(). The default string contains From, Reply-To and Content-Type headers, each ending with a CRLF. The result is passed to wp_mail() when the email is sent.

Parameters#

ParameterTypeDescription
$headersstringThe header string.
$emailsRPRESS_EmailsThe RPRESS_Emails instance sending the email.

Return value#

string. The header string.

Example#

function my_email_headers( $headers, $emails ) {
	return $headers . "Bcc: manager@example.com\r\n";
}
add_filter( 'rpress_email_headers', 'my_email_headers', 10, 2 );

Notes#

Each header line should end with a CRLF, as in the default value.

Source#

Applied in:

  • includes/emails/class-rpress-emails.php (line 189), in RPRESS_Emails::get_headers()

See also#

Was this page helpful?