[wp-trac] [WordPress Trac] #64368: `Could not instantiate mail function` errors sending mail in 6.9

WordPress Trac noreply at wordpress.org
Sat Dec 13 12:30:46 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 SirLouen):

 Ok, @Monarobase I see where you are coming. It's not entirely true that
 SPF should be aligned with Sender Address. You only have to specify which
 hostname is authorized for sending in your behalf.

 But Sender address must be aligned with From address.

 And by default, here you have a problem if you default in your hosting
 default Sender address.

 So in my example, simply by changing the SPF from `v=spf1 +mx +a
 +ip4:57.128.96.9 ~all`
 to `v=spf1 +mx +a +ip4:57.128.96.9 include:relay.mailchannels.net ~all`

 You can ensure, that despite of having a return path set to
 `wordpress at f1onboard.com`, your relay hostname is respected.

 Specially because my FROM (by default) is `wordpress at f1onboard.com`

 With the Sender address, being also the same, we align both FROM and
 Sender, as DMARC RFC requires.
 https://datatracker.ietf.org/doc/html/rfc7489 (3.1.2)

 >  In relaxed mode, the [SPF]-authenticated domain and RFC5322.From domain
 must have the same Organizational Domain.  In strict mode, only an exact
 DNS domain match is considered to produce Identifier Alignment.

 So if you are planning to leave the default server Sender like
 `user at pdx1-shared-a2-09.dreamhost.com`

 You should never be able to align it with your `From:` address for DMARC
 passing according to RFC.

 Also, what is the point of having such default Return-Path?. It's a wrong
 practice. It is like sending a letter to your friend, and setting your
 postal office as the Return-Path. We have to get back to basics. I know
 that wrong setups have been working for ages, and as I have demonstrated,
 you can get your email passing with just DKIM, but as you have said:

 > In your tests, email delivery succeeded because most receiving systems
 do not reject a single message solely because the envelope sender is
 invalid. Modern anti-spam systems typically assign a score or probability
 to each message based on many signals, one of which is RFC compliance.

 To ensure full deliverability, the triad must be passing (SPF+DKIM+DMARC),
 and in this scenario you are proposing DMARC is going to be failing due to
 the alignment problems. This is why `PHPMailer` had `setFrom` aligning
 From and Sender by default.

 Now adding the relay hostname and a little mistake in the DMARC that I
 forgot to add the `_dmarc` record hostname this is the result:

 {{{
 Delivered-To: sir.louen at gmail.com
 Received: by 2002:a05:7011:21c8:b0:4f3:5ee4:767e with SMTP id
 sh8csp766115mdb;
         Sat, 13 Dec 2025 04:22:33 -0800 (PST)
 X-Google-Smtp-Source:
 AGHT+IHG0s4n/YjzLAMpY+/gw1JFU1JO5AAp5LMGDap1uamHl8sEJ2g5CsdE63w3ssJif5roCfwB
 X-Received: by 2002:a05:6a00:8c11:b0:7f1:471b:64e5 with SMTP id
 d2e1a72fcca58-7f671b52e94mr4212163b3a.58.1765628553289;
         Sat, 13 Dec 2025 04:22:33 -0800 (PST)
 ARC-Seal: i=2; a=rsa-sha256; t=1765628553; cv=pass;
         d=google.com; s=arc-20240605;
 b=jQfGfJdJuHrEwhMfZq3rUS6kgraem99sJXLZ9Do3JEMJ9DP9kxMi2J1tCy6Ri7Un8Y
 kb/QYXUZZwqvSPwh449mhcmN1SnZOSEHD2QCoxzxqGaBy0OCgps3HG4MdYBF/rxhrkkO
 xjKukQYmaBAcdA/7wGVnZeT+BMPXA2XpcvCO9G9zFCzgoy/iJPN3Dg8z/0PqqLjO41zb
 Jjbg2H3nBGyIzZRDx2aeXG6aHhc6JxPOaOjoKsW8kWXSqSF5CSjJnH1hfRnKpGRxv7zu
 BBAgLHv8DnPMhNj2zhtMta97I19a60qpNkjxS8CKHVTDWoQEf6F9Av9bwnyZY6E6PKux
          +ZBw==
 ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
 s=arc-20240605;
         h=content-transfer-encoding:mime-version:message-
 id:from:date:subject
          :to:dkim-signature;
         bh=3CfPD7UR79b0pwo73P1gLA2UppZDA98AF2Gz5r6D8oI=;
         fh=LnWiZB+0qsThBew1oCwmWb63UJ40SUAv5hSa6DrXbks=;
 b=P++igZ6wmU/7apC0D3Gk+N4FA5/KyXD+kpKzbBwBNoX6Rp3yb1jzLaZogzyu0lAmlt
 aGj/vDr06j5eWjN+drEsOCEjaOcPxxV+74fumGIOqmFugMaolsJB7rhYWa5hJFAW0xmR
 WH+4cXV54oayCjwcFOnrr6C0mBlyrHuFByxWZQsZv1tFE9RkUHBdyswcIbnk7dMoB9ls
 3XWoDl1fvkcXIu5ffOUi2Tz9Bh5t+NVZY57WFbFh/XqKc95RH2p5ALO44ffQCnKOAnxg
 IB4JcRfe4heUSMyc0BWgAJ+EuZAb9ZkSV+QKAXD3GMJJmhnWxkpj7Fw05J11DSrV4jW4
          9PuQ==;
         dara=google.com
 ARC-Authentication-Results: i=2; mx.google.com;
        dkim=pass header.i=@f1onboard.com header.s=default
 header.b=DTMipAkI;
        arc=pass (i=1);
        spf=pass (google.com: domain of wordpress at f1onboard.com designates
 23.83.209.27 as permitted sender) smtp.mailfrom=wordpress at f1onboard.com;
        dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=f1onboard.com
 Return-Path: <wordpress at f1onboard.com>
 Received: from butterfly.birch.relay.mailchannels.net
 (butterfly.birch.relay.mailchannels.net. [23.83.209.27])
         by mx.google.com with ESMTPS id
 d2e1a72fcca58-7f4c66f352csi15626766b3a.291.2025.12.13.04.22.32
         for <sir.louen at gmail.com>
         (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
         Sat, 13 Dec 2025 04:22:33 -0800 (PST)
 Received-SPF: pass (google.com: domain of wordpress at f1onboard.com
 designates 23.83.209.27 as permitted sender) client-ip=23.83.209.27;
 Authentication-Results: mx.google.com;
        dkim=pass header.i=@f1onboard.com header.s=default
 header.b=DTMipAkI;
        arc=pass (i=1);
        spf=pass (google.com: domain of wordpress at f1onboard.com designates
 23.83.209.27 as permitted sender) smtp.mailfrom=wordpress at f1onboard.com;
        dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=f1onboard.com
 X-Sender-Id:
 ethernetserversltd|x-authuser|fonboard at jazz.cleannameservers.com
 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by
 relay.mailchannels.net (Postfix) with ESMTP id 7F898920DD8 for
 <sir.louen at gmail.com>; Sat, 13 Dec 2025 12:22:32 +0000 (UTC)
 Received: from jazz.cleannameservers.com (100-107-170-83.trex-
 nlb.outbound.svc.cluster.local [100.107.170.83]) (Authenticated sender:
 ethernetserversltd) by relay.mailchannels.net (Postfix) with ESMTPA id
 D221F920C49 for <sir.louen at gmail.com>; Sat, 13 Dec 2025 12:22:31 +0000
 (UTC)
 ARC-Seal: i=1; a=rsa-sha256; d=mailchannels.net; s=arc-2022; cv=none;
 t=1765628552;
 b=fj2ubN0neh22WFKz9i1IFMqsRUK4IjdxtIYrgOBHBNcjGasJyM5sbEMnAo+TxJd2PsReui
 3y1gg0GKlXEsMtIse7yCCvwfKDLjGpdGntQvAA0wgnCJR0IUbI2zBDmsb8logzx9pKCvqV
 7ZJdyEkpVTnfSz3ILpB1k1HEzXMkCtkBXryPY/stZek9CUs2PXY2JuB6x39i9qFiitSp4P
 kHvXTLRaty+ECmBG+6fpdxDBTLaGFEksqkQvHSVjaRlUKWc8UE0aT64w95Dm1k377MKD9n
 bYvHH3w6R3niS7S0HkCUqCVSf28OaSVNTXE3Y77t8yq8iRack/SxWTGCA/5LIQ==
 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1765628552; h=from:from:reply-
 to:subject:subject:date:date:message-id:message-id:
          to:to:cc:mime-version:mime-version:content-type:content-type:
          content-transfer-encoding:content-transfer-encoding:dkim-
 signature; bh=3CfPD7UR79b0pwo73P1gLA2UppZDA98AF2Gz5r6D8oI=;
 b=EV2IZyF61azsfBgSRUWPPvtjYyY8k/cbGH9VleKk8zwOCPcMppVJiOvyc465Rsza1lvucd
 +Vi3ThBUW231eC0bwJw6msG0MVsljOjgXE4sK4Ri0fn7ykc9l0Ms2+J8fSZVs2TonJ2pqO
 CvdRwO11wSACWDRbpFVFm8/g/n1cOuVQtxrQJXAumDWohst6phxocEJuIqHlqj0WjCBd1C
 fxNtSWhm5f/3otOuA67TI4XJ3Qo7CjOZJMYx8AUChXd0QfC2AU5LvecR2Q7y5RHSE8O/Cb
 oX+/ckH0rFbU1xP/zMcOJG89wEVfT92isV3hw1DDEQv9SyXuR6i92YM+BxfMCw==
 ARC-Authentication-Results: i=1; rspamd-6ccd5b4cc5-twfbm; auth=pass
 smtp.auth=ethernetserversltd smtp.mailfrom=wordpress at f1onboard.com
 X-Sender-Id:
 ethernetserversltd|x-authuser|fonboard at jazz.cleannameservers.com
 X-MC-Relay: Neutral
 X-MailChannels-SenderId:
 ethernetserversltd|x-authuser|fonboard at jazz.cleannameservers.com
 X-MailChannels-Auth-Id: ethernetserversltd
 X-Eyes-Army: 5a03e00a6601bedc_1765628552349_3873168343
 X-MC-Loop-Signature: 1765628552349:1819422308
 X-MC-Ingress-Time: 1765628552349
 Received: from jazz.cleannameservers.com (jazz.cleannameservers.com
 [57.128.96.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by
 100.107.170.83 (trex/7.1.3); Sat, 13 Dec 2025 12:22:32 +0000
 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=f1onboard.com; s=default; h=Content-Transfer-Encoding:Content-Type:
 MIME-Version:Message-ID:From:Date:Subject:To:Sender:Reply-To:Cc:Content-
 ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To
 :Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help
 :List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=3CfPD7UR79b0pwo73P1gLA2UppZDA98AF2Gz5r6D8oI=;
 b=DTMipAkI/hZNHj4DyF57nUxmMw
 YGZcGonGmOtusk8sOHaCzwEmWDgTgI1kS3YVpOsHmuWDvEtoHn0eSjbL5m9ifpFc5Bux/jOdh3qB7
 1kq1BFnQcwa1abzkfpzSbsL6hlOX7CkStVQW8jJz7Eyy0auTrNPaUfGlYYoilfg002CM718F6EN0S
 96g0pUokXJObzGI+MF7vEvp0Yia3joHU3RqJjamr3WcL2RgvixNPH/MTG0s9s/IqucREDXwMrn/gm
 /KCHSm5eMme0r/qfkDKQy5GoyvSBDINWhWmXoe7h0x3AdglG5vvO7q76QhFLotLqEPP5W4B5cq5Hx
 c4du+yfg==;
 Received: from fonboard by jazz.cleannameservers.com with local (Exim
 4.98.2) (envelope-from <wordpress at f1onboard.com>) id 1vUOdl-00000003srP-
 41sV for sir.louen at gmail.com; Sat, 13 Dec 2025 12:22:30 +0000
 To: sir.louen at gmail.com
 Subject: Health Check – Test Message from https://f1onboard.com
 Date: Sat, 13 Dec 2025 12:22:25 +0000
 From: WordPress <wordpress at f1onboard.com>
 Message-ID: <c23gaMCKfqyCrMK7ATkh055FqSKml3rbzJUJMZ3M at f1onboard.com>
 X-Mailer: PHPMailer 7.0.0 (https://github.com/PHPMailer/PHPMailer)
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 X-AuthUser: fonboard at jazz.cleannameservers.com

 Hi! This test message was sent by the Health Check plugin from My Blog
 (https://f1onboard.com) on December 13, 2025 at 12:22 pm. Since you’re
 reading this, it obviously works.

 Additional message from admin: This is a test email
 }}}

 All 3 SPF, DKIM and DMARC passing, with Sender and From aligned and SPF
 pointing to the relay, for the rest, all defaults, both in the CPANEL
 hosting, no inboxes and no modifications in the WordPress side either, all
 default also (just Health Check, to easily send the email)

 This is the minimum SPF/DMARC/DKIM configuration anyone should expect for
 deliverability. Having in 2025 anything less than this is, as you said,
 risking deliverability. And SPF/Sender is not exclusively the culprit.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64368#comment:55>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list