Filter hook 'pre_wp_mail'

in WP Core File wp-includes/pluggable.php at line 214

Description

Filters whether to preempt sending an email. Returning a non-null value will short-circuit {@see wp_mail()}, returning that value instead. A boolean return value should be used to indicate whether the email was successfully sent. }

Occurrences

Filename Line Number
wp-includes/pluggable.php 214

Parameters

Type Name Description
null|bool $return Short-circuit return value.
array $atts { Array of the `wp_mail()` arguments.

PHP Doc

/**
		 * Filters whether to preempt sending an email.
		 *
		 * Returning a non-null value will short-circuit {@see wp_mail()}, returning
		 * that value instead. A boolean return value should be used to indicate whether
		 * the email was successfully sent.
		 *
		 * @since 5.7.0
		 *
		 * @param null|bool $return Short-circuit return value.
		 * @param array     $atts {
		 *     Array of the `wp_mail()` arguments.
		 *
		 *     @type string|string[] $to          Array or comma-separated list of email addresses to send message.
		 *     @type string          $subject     Email subject.
		 *     @type string          $message     Message contents.
		 *     @type string|string[] $headers     Additional headers.
		 *     @type string|string[] $attachments Paths to files to attach.
		 * }
		 */