[wp-trac] [WordPress Trac] #64368: `Could not instantiate mail function` errors sending mail in 6.9
WordPress Trac
noreply at wordpress.org
Fri Dec 12 22:45:29 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: has-patch | Focuses:
--------------------------+-----------------------
Comment (by siliconforks):
Replying to [comment:47 dmsnell]:
> Maybe you are saying that WordPress did not send anything through
`PHPMailer` in the //before// case, and PHP’s `mail()` auto-set it? and
somehow that would be some default that hosts configure in a way that it
would be valid?
A real-world example might be helpful here...
[https://core.trac.wordpress.org/ticket/64387#comment:2 This user]
mentioned using DreamHost for hosting; curious, I did some testing on a
shared DreamHost server to see how they handle mail.
If you send email from a shared DreamHost server without specifying an
envelope sender, it seems that your envelope sender ends up looking
something like this:
{{{
user at pdx1-shared-a2-09.dreamhost.com
}}}
Is that address "valid"? I would say, not really (I'm pretty sure that
it's not a real mailbox). However: it is valid in the sense that it does
pass SPF.
{{{
Received-SPF: pass (... domain of
pdx1-shared-a2-09.dreamhost.com designates 69.163.136.89 as permitted
sender)
client-ip=69.163.136.89; envelope-
from=...pdx1-shared-a2-09.dreamhost.com;
helo=pdx1-shared-relay-02.dreamhost.com;
}}}
So if you have a website `example.com` running WordPress 6.8 hosted on a
DreamHost server, and you send email, your message will have an envelope
sender value of something like `user at pdx1-shared-a2-09.dreamhost.com`,
which is not exactly ideal, but it will pass SPF.
If you upgrade to WordPress 6.9 and send mail, your message will now have
an envelope sender of `wordpress at example.com`. This seems like an
improvement, but will it pass SPF? If you have an SPF record for
`example.com`, and it designates your DreamHost server as an allowed
sender, then you should be fine - it should still pass SPF as before. But
if you don't have an SPF record for `example.com`, or it's incorrect
somehow, then your message will no longer pass SPF. So it's possible that
you may end up having problems getting email delivered (while it was
working before in version 6.8).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64368#comment:48>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list