[wp-trac] [WordPress Trac] #53048: PHPMailer uses hardcoded default sender mail address, preventing mail to be sent
WordPress Trac
noreply at wordpress.org
Fri Apr 16 17:42:57 UTC 2021
#53048: PHPMailer uses hardcoded default sender mail address, preventing mail to be
sent
--------------------------+------------------------------
Reporter: vinc17 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Mail | Version: 2.2
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+------------------------------
Changes (by knutsp):
* keywords: => close
* version: 5.6.2 => 2.2
Comment:
You may want this code at line 378:
{{{#!php
/**
* Filters the email address to send from.
*
* @since 2.2.0
*
* @param string $from_email Email address to send from.
*/
$from_email = apply_filters( 'wp_mail_from', $from_email );
}}}
You may then apply this filter and set whatever from address you want.
There is also a filter wp_mail_from_name just below. Se docs at
https://developer.wordpress.org/reference/functions/wp_mail/#usage
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53048#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list