[wp-trac] [WordPress Trac] #60420: Default sender address
WordPress Trac
noreply at wordpress.org
Mon Jul 14 12:45:33 UTC 2025
#60420: Default sender address
-----------------------------+------------------------------
Reporter: thinlinecz | Owner: (none)
Type: feature request | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Mail | Version: 1.5.1.2
Severity: normal | Resolution: wontfix
Keywords: | Focuses:
-----------------------------+------------------------------
Comment (by SirLouen):
Replying to [comment:3 michael.orlitzky]:
> Two options would be better, but admin address is better than guessing.
To put it bluntly, the existing setting is wrong: there's no reason to
expect an organization to use the same company for their web and email
hosting, and most email systems require SPF/DKIM/DMARC/etc these days.
Using the $SERVER_NAME is causing important email to disappear, and AFAIK
has nothing else to recommend it over the admin address.
Yes, I agree that it's too tricky as-is nowadays. Its funny because #1532
as you say was arguing about that www thing, but in the end, the fix was
switching admin email to a fixed wordpress with www stripping (check the
changeset [3214]). So basically what I was trying to illustrate there is
that original it was actually taking the admin email.
Still, this is a complex discussion if "Admin email" is ideal. Nowadays,
as you say with such many "checks" for mostly anti-spam and security
measures, its difficult to guess which will be the ideal sender/from
email.
As I said, all problems as solved if we used the hook `wp_mail_from`.
As it's now current WP_Mail is as follows:
1. By default no specific PHPMailer is done, for this reason, `mail`
function will be used by default, which takes the default MTA in the
server.
2. A default MTA could be configured in multiple ways. So choosing a
default is not trivial.
3. The default and standard configuration is as simple as: reverse domain
pointing to server IP address. Server configured with a single domain, and
such domain serving the site for Webserver default address, which means,
serving the domain for the WP site. For this reason, hostname ===
`WP_SITEURL` (stripping www) and this is how you get to the default
selected option.
4. As @knutsp, `wordpress@` as a forwarder is just a matter of randomness
selection. It could have been `info`, `webmaster` or whatever, there is no
standard for this, so looks fair to choose the same name as the service
for this purpose.
Could Admin Email be a better option? Its more visual and definitely feels
much more intuitive. Maybe we could draft a new proposal in a new ticket
stating all the reasons of why this should be the way to go. I'm not 100%
against this.
There is only one massive problem: Backwards compatibility. In an era
where WP is the 40% of the internet, potentially thousands if not millions
of servers are already working with default behaviour. If we update the
version changing this, there could be massive potential email breakages in
multiple sites. For this reason, I'm 99.999% certain that this proposal
will be rejected.
Replying to [comment:4 knutsp]:
> I suggest the setup, options(?), Site Health entry(?), the documentation
and the recommendadtions become a case for the hosting team at wp.org, if
they are still in operation.
Good suggestions. I'm going to take note and see how can we handle this.
Personally I like the idea that @michaelorlitzky was proposing, but
realistically speaking knowing all the hindrances that WP pose, this is
the way to go.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60420#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list