Filters the email address to send from.
Parameters
$from_email
string- Email address to send from.
Source
$from_email = apply_filters( 'wp_mail_from', $from_email );
Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |
Filters the email address to send from.
$from_email
string$from_email = apply_filters( 'wp_mail_from', $from_email );
Version | Description |
---|---|
2.2.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
The default “from” value is wordpress@thesitedomainname. Where thesitedomainname is the domain name of your web site (e.g. xxxyyyzz.com).
Examples migrated from Codex:
Using anonymous functions (PHP 5.3.0+) for callback:
Example of how to use this filter to update the user portion of the email address to send from.
Simple way to filter the email address using str_replace() function.