[wp-trac] [WordPress Trac] #64368: `Could not instantiate mail function` errors sending mail in 6.9
WordPress Trac
noreply at wordpress.org
Sat Dec 6 17:42:37 UTC 2025
#64368: `Could not instantiate mail function` errors sending mail in 6.9
--------------------------+-----------------------
Reporter: desrosj | Owner: SirLouen
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.9.1
Component: Mail | Version: 6.9
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+-----------------------
Changes (by SirLouen):
* keywords: needs-testing => close
Comment:
I've found the solution to this problem. After reviewing Sendmail and PHP
code, I was trying to understand how the Sender processing was being done,
as it made no sense to me (plus the `sendmail_from` thing). I thought that
the problem was that it was adding a `sendmail_from` but this was
irrelevant. It's true that having a `sendmail_from` set up, will set it as
the Sender envelop but not because of PHP default behaviour but a
PHPMailer casuistry that is not relevant to this specific problem.
The thing is that all issues fall into PHPMailer: it was basically double-
setting the `-f` parameter if the `sendmail_path` was set (as many had,
and as it is a recommendation by the PHP docs).
I've already proposed a fix, and I will rush it to have it ready before
6.9.1 release.
For those having the issue and want a temporary fix, just set the Sender
to empty as commented here
https://core.trac.wordpress.org/ticket/64368#comment:4
Once updated to 6.9.1 this code can be removed.
cc @studiomondiale @digitalblanket
I'm adding `close` as a candidate of `reported-upstream` once this has
been sorted out.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64368#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list