On this page
apply_filters( 'wp_mail_from_name', string $from_name )
Filters the name to associate with the “from” email address.
Parameters
$from_namestring-
Name associated with the "from" email address.
More Information
- The filter modifies the “from name” used in an email sent using the wp_mail() function. When used together with the ‘wp_mail_from‘ filter, it creates a from address like “Name <first.last@example.com>”. The filter should return a string.
- If you apply your filter using an anonymous function, you cannot remove it using remove_filter() .
Source
File: wp-includes/pluggable.php. View all references
$from_name = apply_filters( 'wp_mail_from_name', $from_name );
Related
Used By
| Used By | Description |
|---|---|
| wp_mail() wp-includes/pluggable.php | Sends an email, similar to PHP’s mail function. |
Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_mail_from_name