string $from_name )
Filters the name to associate with the “from” email address.
Name associated with the "from" email address.
- 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 <email@example.com>”. The filter should return a string.
- If you apply your filter using an anonymous function, you cannot remove it using remove_filter() .
View all references
$from_name = apply_filters( 'wp_mail_from_name', $from_name );
Example migrated from Codex:
It is not necessary to call another method if you can use anonymous functions (PHP 5.3.0+):