[wp-trac] [WordPress Trac] #49687: wp_mail() - Why is no envelope sender defined?
WordPress Trac
noreply at wordpress.org
Wed Aug 6 13:50:37 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-test-info | Focuses:
-----------------------------+------------------------------
Comment (by SirLouen):
Related #22837
I've been testing, and as I said in my previous message, the absence of
`Sender` should not be an inconvenience in 2025 for any reliable local
MTA.
Although I tested it in `msmtp` and it reported sender problems without
the `-f`, confirming that, with some clients there could be a problem by
omitting this parameter.
== Testing Protocol
So from here I will be posting the results using different MTA and trying
to see if the set to `false` of `auto` in PHPMailer's `setFrom` is
justified or not.
=== Test 1: Using Postfix for the MTA
For the first test, I'm using Postfix. WordPress is being reverse proxied
with a Caddy server but the mail transport agent is not being proxied at
all. In this case I'm using Postfix 3.7.11 and for wordpress
[https://core.trac.wordpress.org/ticket/22837#comment:16 these environment
vars]
✅ Email is sent without troubles to a Gmail account
Here is the resulting email:
{{{
Delivered-To: [REDACTED_EMAIL]
Received: by 2002:a05:6359:6c93:b0:1ff:db44:3f60 with SMTP id
td19csp103289rwb;
Wed, 6 Aug 2025 06:45:16 -0700 (PDT)
X-Google-Smtp-Source:
AGHT+IHfURwEJp/wfNGBM+hPI0F7isAxnOk4r3ckhMxwX1vbZsw3ltC0TN9XpWt+sLxmFtzIhv22
X-Received: by 2002:a05:6512:3c8e:b0:55b:8f40:32bd with SMTP id
2adb3069b0e04-55caf34c5bfmr895771e87.33.1754487916361;
Wed, 06 Aug 2025 06:45:16 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1754487916; cv=none;
d=google.com; s=arc-20240605;
b=S9gyKcUIAMW7nkD7FEA8EprPJHKLIy8F5eU1Tv+RebjALZEbZNSxPs8WNdqNU95XhH
5qIkSJ5EZAwkix0A9jVaIdn5d96xC9MhNIiyFgWggjSlGB7oVp3Aa4rhKSgLtzotD/YA
9vVO4uLU+Hjuw7OA1BB6zWES9h2WO36thEGAIP2ZFQdmTJnrlQqys0kdsCMJEVWvpsjI
opq7dEIR1ec3vgv6GtN9IIZ8uzpU1gUoXh9LXfGDm1A1rpNe7+5DK75sYMdbOgZWRFXh
TJzMYrkq3ZizQZCJp+cIMsQ65cAf1QZ7U8BMps2MVrU0YuiYAY228qynnYLHYjVXLW88
pE5Q==
ARC-Message-Signature: i=1; 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=pm0pN+ANahqck0BActi6j9KgyOF87JJqpDBwwhtS3/8=;
fh=LnWiZB+0qsThBew1oCwmWb63UJ40SUAv5hSa6DrXbks=;
b=iVnirhM2bTnFWVwmv39TE/TbEfpAhUeclZtqnmUgwzjESoP66xMu9UxUyIU2xulMop
e6OYHWPlqNhyvLpcoq3UjqOB66n7EU/ZSylqyjb7uP1FTWQXxQT08VF47APUp710AKmL
AXBjhDLAjb/TMgBsqqjDHH5rVz1MQZ3ZnywvhnFOAVvXji3UmkFnVvao2oJfLulYcWOO
4qbTHYni0706+0prjCgal3NoPVTc+9dDAYZnGXJfbd3ozVAjswiX90JvBFMCrvl6783P
+6aRUWb0ye8dDKIUUI2d90ekfVGvQGpOcGVQoH1LmOytuLlVPH8IWbKP61EJNJD96pUh
Sq2Q==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@[REDACTED_SERVER_HOST] header.s=mail
header.b=D6ZD3vYa;
spf=pass (google.com: domain of wordpress@[REDACTED_SERVER_HOST]
designates [REDACTED_SERVER_IP] as permitted sender)
smtp.mailfrom=wordpress@[REDACTED_SERVER_HOST];
dmarc=pass (p=REJECT sp=REJECT dis=NONE)
header.from=[REDACTED_SERVER_HOST]
Return-Path: <wordpress@[REDACTED_SERVER_HOST]>
Received: from [REDACTED_SERVER_HOST] ([REDACTED_REVERSE_HOST].
[[REDACTED_SERVER_IP]])
by mx.google.com with ESMTPS id
2adb3069b0e04-55b887df9ebsi4154730e87.107.2025.08.06.06.45.15
for <[REDACTED_EMAIL]>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 06 Aug 2025 06:45:15 -0700 (PDT)
Received-SPF: pass (google.com: domain of wordpress@[REDACTED_SERVER_HOST]
designates [REDACTED_SERVER_IP] as permitted sender) client-
ip=[REDACTED_SERVER_IP];
Authentication-Results: mx.google.com;
dkim=pass header.i=@[REDACTED_SERVER_HOST] header.s=mail
header.b=D6ZD3vYa;
spf=pass (google.com: domain of wordpress@[REDACTED_SERVER_HOST]
designates [REDACTED_SERVER_IP] as permitted sender)
smtp.mailfrom=wordpress@[REDACTED_SERVER_HOST];
dmarc=pass (p=REJECT sp=REJECT dis=NONE)
header.from=[REDACTED_SERVER_HOST]
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=[REDACTED_SERVER_HOST]; s=mail; t=1754487915;
bh=pm0pN+ANahqck0BActi6j9KgyOF87JJqpDBwwhtS3/8=;
h=To:Subject:Date:From:From;
b=D6ZD3vYaKdxPsALFXP83772Yse7M6tXkW2wr4vOieEtliFq7Nd6mkixbXjmro86eB
HdgwiUG022juBDRpsgLsQz+m2xeyWfMYZ4Bbbk3x9xcT+f7Utmvo1UjCfl9re8KAgc
uvISwsJ+gUKmWA596tyGG+WFLYG6BzI2+UhxlgXo=
Received: by [REDACTED_SERVER_HOST] (Postfix, from userid 33) id
978A121C0B; Wed,
6 Aug 2025 13:45:15 +0000 (UTC)
To: [REDACTED_EMAIL]
Subject: Health Check – Test Message from https://[REDACTED_SERVER_HOST]
Date: Wed, 6 Aug 2025 13:45:15 +0000
From: WordPress <wordpress@[REDACTED_SERVER_HOST]>
Message-ID:
<DAeEY8uz0xzBIMrxcRcH6kvrJTLBuK1nTutUOIJ1o@[REDACTED_SERVER_HOST]>
X-Mailer: PHPMailer 6.9.3 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Hi! This test message was sent by the Health Check plugin from WP Testing
(https://[REDACTED_SERVER_HOST]) on August 6, 2025 at 1:45 pm. Since
you’re reading this, it obviously works.
Additional message from admin: This is the first test
}}}
Note that since this is sent via Postfix and Postfix works correctly both
setting `-f` and without, it will work the exact same in both scenarios.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49687#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list