WordPress sends from [email protected] by default, with WordPress as the From name. Two filters change those values: wp_mail_from and wp_mail_from_name. Both run inside wp_mail() before every message leaves the server. A plugin or snippet can hook either one; FluentSMTP and Post SMTP can also put their own From in place after the filters have run. The administrator email is unrelated: it’s where WordPress delivers system mail, not what appears in the From header.
For most sites, the From change belongs in the SMTP plugin’s From Email override: the same plugin already controls delivery, and setting the From there keeps the sender on the signing domain. A site without an SMTP plugin (it should have one for deliverability) can use a small mu-plugin with the two filters; a dedicated From-override plugin is the third option, useful when a UI override is needed and the SMTP plugin’s From field is off the table. The mu-plugin path is the no-plugin slice covered by nanoPost’s WordPress without the plugin hub.
All three paths share one constraint: the From address must sit on a domain the sending pipeline can authenticate. If you set From: [email protected] while the relay authenticates mail only for a different domain, neither SPF nor DKIM aligns with yourdomain.com. The message then fails DMARC if yourdomain.com publishes a record, and the receiver decides what to do with it.
What WordPress actually sends by default
In wp_mail() (wp-includes/pluggable.php), the default From address is constructed as wordpress@ plus the host portion of network_home_url(), with a leading www. stripped. The default From name is the string WordPress. On a site at https://www.example.com, the defaults are [email protected] and WordPress. Both values are filterable: wp_mail_from and wp_mail_from_name run before the message is handed to the mailer, so a single add_filter() call on either replaces the default for every message sent through wp_mail().
A global add_filter( 'wp_mail_from', ... ) applies to all mail sent through wp_mail(), including new-user notifications, password resets, and comment notifications. There is no category of core WordPress mail that bypasses the filter by setting a fixed From before it runs. If a specific message type still shows the old address after the filter is in place, check the filter priority; another plugin may be applying a From with a higher priority number later in the same hook.
Path A: The SMTP plugin’s From Email override
WP Mail SMTP‘s override fires after every other filter, which means WooCommerce order emails and contact form plugins that set their own From can’t override it.
WP Mail SMTP. Go to Settings > WP Mail SMTP > Settings. The “From Email” and “From Name” fields set the global sender details. Check “Force From Email” to make the override authoritative across all plugins; without it, plugins that set their own From header at the message level will override the global setting for their own messages.
FluentSMTP. Open the FluentSMTP dashboard and edit the active connection. The “From Email” and “From Name” fields are under Sender Settings. FluentSMTP keeps a From that matches a connection’s From Email (or an additional sender listed on an Amazon SES or toSend connection) and sends the message through that connection. Any other From goes to the default connection. If the default connection is SMTP, Amazon SES, toSend or PHP mail(), its “Force From Email (recommended)” checkbox, on by default, replaces that From with the connection’s From Email; with the box off, the From passes through. A newly set up connection of another type (Outlook, Gmail, SendGrid, Mailgun and Postmark among them) has no such checkbox and replaces that From too. If you switch a connection from one of the four types to another type, the form keeps the checkbox: with the box off, Outlook and Gmail pass the From through, and the rest still replace it. With several connections, set the From on each.
Post SMTP. The From address is the “Email Address” field in Post SMTP’s message settings (“From Email” in its setup wizard), and the From name is the “Name” field beside it. Under the address, “Prevent plugins and themes from changing this” (“Force From Email” in the wizard) replaces the From that other plugins set.
The alignment constraint. The From address must sit on a domain the sending pipeline can authenticate. If the site sends through Postmark with DKIM configured for example.com, the From address can be anything @example.com (hello@, notifications@, noreply@) and alignment holds because the organisational domain matches under DMARC’s relaxed mode. Setting the From to an address on a different domain ([email protected]) while the mail authenticates only for example.com breaks alignment. The message then fails DMARC if anotherbrand.com publishes a record; its policy can ask receivers to quarantine or reject the message, and each receiver decides. See the DNS setup guide for WordPress email for SPF, DKIM, and DMARC configuration.
Path B: A mu-plugin with wp_mail_from and wp_mail_from_name
For sites where the SMTP plugin’s From field is managed by a different team (agency templates, environments where configuration doesn’t persist), the filter approach is cleaner than a UI override.
The snippet belongs in wp-content/mu-plugins/, not the active theme’s functions.php. A theme switch removes any customisation in functions.php silently; a mu-plugin survives theme changes, child-theme misconfiguration, and plugin deactivation. A single file is enough:
<?php
/**
* Override wp_mail() From address and From name.
* Placed in wp-content/mu-plugins/ so it survives theme switches.
*/
add_filter( 'wp_mail_from', function ( $original ) {
$override = '[email protected]';
return is_email( $override ) ? $override : $original;
} );
add_filter( 'wp_mail_from_name', function ( $original ) {
return 'Example Site';
} );
The is_email() check on wp_mail_from is a safety net: if the hardcoded address contains a typo, the filter returns the original value and mail continues to send rather than being constructed with a malformed From: header.
This snippet applies the same constraint as Path A: [email protected] must be on a domain the sending pipeline can authenticate. The snippet changes the From: header only; it does not configure the sending route or the DKIM signature. If the site routes through PHP’s mail() or an unauthenticated relay, changing the From address does not help delivery and may worsen it by misaligning the envelope sender domain. Configure an authenticated SMTP relay first; see checking that WordPress can send email and the DNS setup guide.
For the broader question of where to put custom code in WordPress, adding custom code to WordPress covers the options and trade-offs.
Path C: A dedicated From-override plugin
Several plugins on the WordPress plugin directory exist solely to set wp_mail_from and wp_mail_from_name through a settings UI. They are the right pick for the small population of sites that want a UI-controlled From and either do not have an SMTP plugin or have a specific reason not to use the SMTP plugin’s From field.
Before installing one, check three things: the plugin’s “Last updated” date on WordPress.org (a plugin not updated in over a year may carry PHP compatibility issues or hook mismatches against recent WordPress versions), the active install count (choose a plugin with at least 10,000 active installs and an update within the past 12 months), and the implementation approach. A plugin that hooks wp_mail_from and wp_mail_from_name is doing the right thing; a plugin that replaces wp_mail() wholesale is overreaching and can break compatibility with other plugins. The changelog or plugin source will show which approach it takes.
Path C carries the same alignment constraint as Paths A and B. A dedicated From-override plugin provides no help with deliverability; it changes the header only.
The alignment constraint
Changing the From: to [email protected] while the signing domain is example.com produces a misaligned DKIM signature. If SPF does not align with newbrand.com either, the message fails DMARC under any policy newbrand.com publishes. p=quarantine and p=reject state what the domain owner prefers, and
RFC 9989 leaves the handling to the receiver. A failure can be silent: the RFC describes a “silent discard”, where the receiving server answers that it accepted the message and then
drops it.
To check authentication after a change, send a test message to a fresh
Mail-Tester address and read the report. It gives SPF, DKIM and DMARC separate pass or fail results, and its DMARC details list the From domain and DKIM signing domain; a DMARC pass can come from aligned SPF or aligned DKIM. If the From change needs to move to a domain the current provider is not configured to sign, consult the provider’s DKIM setup documentation: Postmark, SMTP2GO, and SendGrid each publish per-account DKIM selectors under different configuration paths.
Verdict
For most WordPress sites, the From change belongs in the SMTP plugin’s settings. WP Mail SMTP and Post SMTP each have a setting that applies the override to mail from other plugins. FluentSMTP applies it by default to any From that isn’t one of its connections’ own addresses. The mu-plugin filter approach is the right path for code-managed configurations: agency templates, sites where the SMTP plugin’s From is owned by a different team, or sites deploying to environments where UI configuration does not persist. The dedicated From-override plugin category is a viable third option when a UI override is needed and the SMTP plugin’s From field is off the table.
| Situation | Recommended path |
|---|---|
| Site has WP Mail SMTP, FluentSMTP, or Post SMTP | Path A: SMTP plugin’s From Email override |
| Code-managed config (agency, multi-site template) | Path B: mu-plugin filter snippet |
| UI needed, SMTP plugin’s From field unavailable | Path C: Dedicated From-override plugin |
Changing the From: header does not authenticate the mail. Configure an authenticated sending route first, then set the From.
Corrections
- 2026-12-03: an earlier version said Mail-Tester checks “SPF, DKIM, and DMARC alignment”. Its report gives SPF, DKIM and DMARC a separate pass or fail result; alignment shows only in the DMARC details, which list the From and DKIM domains.
- 2026-11-26: an earlier version said a receiver enforcing DMARC will quarantine or discard mail whose DKIM signature does not align, that a failure can be silent because receivers need not send failure reports, and that unauthenticated
mail()messages will not deliver reliably. DMARC fails only when neither SPF nor DKIM aligns, and the receiver then decides. A failure is silent when the receiver accepts the message and then drops it. - 2026-11-25: an earlier version said FluentSMTP’s Force From Email checkbox overrides the From site-wide. FluentSMTP offers the checkbox only for SMTP, Amazon SES, toSend and PHP mail() connections, and it keeps any From that matches one of its connections. It also said Post SMTP has no force setting; it has one, “Prevent plugins and themes from changing this”.
- 2026-11-25: an earlier version said any plugin or snippet that changes the sender hooks the
wp_mail_fromfilter, thewp_mail_from_namefilter, or both. FluentSMTP and Post SMTP hook neither; they can apply their own From after the filters have run.
