[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 23:56:38 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:
--------------------------+-----------------------
Comment (by siliconforks):
Replying to [comment:12 SirLouen]:
> > It looks like he is setting $phpmailer->Sendmail to a complete command
line, with options?
>
> No, I asked him to set the `$phpmailer->isSendmail()` method (not
`$phpmailer->Sendmail`), just to check if his sendmail binary was working.
But then I forgot that the `popen` PHP function could be restricted in his
web host, so basically it was a useless test and I asked him to revert.
If you just call `$phpmailer->isSendmail()`, and it fails for some reason,
you should get an error message like this:
{{{
Could not execute: /usr/sbin/sendmail
}}}
But that's not what he got, right? You said he got the following:
{{{
Could not execute: /usr/sbin/sendmail -finfo at domain.name -t -i
}}}
I think the only way to get an error message like that is to do this:
{{{#!php
<?php
$phpmailer->isSendmail();
$phpmailer->Sendmail = '/usr/sbin/sendmail -finfo at domain.name -t -i';
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64368#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list