Filters whether to preempt sending an email.
Returning a non-null value will short-circuit wp_mail(), returning that value instead. A boolean return value should be used to indicate whether the email was successfully sent.
$returnnull|bool
$attsarray
wp_mail() arguments.to string|string[]subject stringmessage stringheaders string|string[]attachments string|string[]$pre_wp_mail = apply_filters( 'pre_wp_mail', null, $atts );
| Version | Description |
|---|---|
| 5.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_wp_mail