[wp-trac] [WordPress Trac] #49687: wp_mail() - Why is no envelope sender defined?
WordPress Trac
noreply at wordpress.org
Sat Aug 9 00:51:17 UTC 2025
#49687: wp_mail() - Why is no envelope sender defined?
---------------------------+------------------------------
Reporter: vbbp | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Mail | Version: 5.4
Severity: major | Resolution:
Keywords: needs-testing | Focuses:
---------------------------+------------------------------
Comment (by siliconforks):
One possible pitfall here is that it appears it is a common
(mis)configuration to have `sendmail_path` in `php.ini` configured with an
`-f` option. If you do that, and then you specify a sender with PHPMailer
(or if you just call PHP's `mail()` function directly while specifying an
`-f` option), you end up providing the `-f` option to `sendmail` twice,
which apparently causes `sendmail` to fail completely.
This is mentioned in the PHPMailer wiki (see the part which mentions `More
than one "from" person`):
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#could-not-
instantiate-mail-function
See also the original bug report:
https://github.com/PHPMailer/PHPMailer/issues/1634
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49687#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list