W3cubDocs

/WordPress

apply_filters( 'wp_mail', array $args )

Filters the wp_mail() arguments.

Parameters

$args

(array) A compacted array of wp_mail() arguments, including the "to" email, subject, message, headers, and attachments values.

More Information

  • The wp_mail filter hook allows you to filter the arguments that are passed to the wp_mail() function. The arguments for wp_mail() are passed through the filter as an array.
  • $attachments should be an array. If it is not, it will be converted to one by the wp_mail function after the filter.

Source

File: wp-includes/pluggable.php

View on Trac

Changelog

Version Description
2.2.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_mail