Microsoft 365 is a common SMTP relay for WordPress sites in organisations already using it for business email. It works, but the configuration has specific requirements, and the error messages when something is wrong are specific enough that you can diagnose them precisely.
Ways to send through Microsoft 365
A WordPress plugin that logs in to Microsoft 365 over SMTP uses SMTP AUTH submission, which goes to smtp.office365.com on port 587 with STARTTLS. It requires per-account authentication, and the account used for sending must have SMTP AUTH enabled.
Direct Send goes to your tenant’s MX host, such as contoso-com.mail.protection.outlook.com, on port 25. It requires no authentication and delivers only to mailboxes in your own tenant.
Microsoft says it rejects mail to anyone outside, and does not specify an error code for that rejection on that page. A tenant that has turned on Reject Direct Send refuses internal Direct Send mail too, with ![]()
550 5.7.68 TenantInboundAttribution.
A third method, SMTP relay through an inbound connector, can reach external recipients without a mailbox login. SMTP relay and Direct Send on WordPress compares it with Direct Send.
SMTP AUTH requirements
Microsoft says SMTP AUTH is disabled for organisations created after January 2020, and that an admin can enable it per mailbox. To enable it:
- Go to Microsoft 365 Admin Centre → Users → Active users.
- Select the account used for SMTP sending.
- Under Mail tab → Manage email apps, enable Authenticated SMTP.
The mailbox setting overrides the organisation-wide one, but not security defaults. With security defaults on,
SMTP AUTH is off and Microsoft says to disable them first. Microsoft also turns SMTP AUTH Basic Authentication (password login)
off by default on existing tenants at the end of December 2026.
Microsoft supports OAuth as
an authentication method for SMTP AUTH, so an OAuth connection over smtp.office365.com still uses SMTP AUTH. FluentSMTP 2.4.5’s Microsoft connection posts to Microsoft Graph instead, and WP Mail SMTP’s documentation describes its Microsoft 365 mailer as API-based. That suggests OAuth avoids the SMTP AUTH setting only in a plugin that sends through an API such as Graph. Microsoft’s pages do not say so directly.
Common errors and what they mean
535 5.7.139
If the response reads 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Mailbox (or for the Tenant), SMTP AUTH is off at that level. Microsoft’s documentation does not list the text; it comes from
errors users have posted. Enable SMTP AUTH at that level, or use a plugin that sends through Microsoft Graph.
550 5.7.30
Microsoft documents 550 5.7.30 Basic authentication is not supported for Client Submission as the response a client gets once Basic authentication is permanently disabled. Its
timeline, read on 25 November 2026, leaves Basic authentication unchanged until the end of December 2026, when it goes off by default on existing tenants; the final removal date is to be announced in the second half of 2027. If this response appears, the plugin logged in to smtp.office365.com with a password. Use OAuth or another sending method: Microsoft 365 is disabling password SMTP has the steps per plugin. Gmail uses 550 5.7.30 for
a failed DKIM check, so read the text after the code.
550 5.7.515
A bounce with 550 5.7.515 Access denied, sending domain [domain] does not meet the required authentication level means Outlook.com, Hotmail, Live.com or MSN rejected the message.
Microsoft applies this to senders of 5,000 or more messages to Microsoft consumer services using the same 5322.From domain. SPF and DKIM must both pass, the domain needs a DMARC record, and SPF or DKIM must align with the From domain. It has nothing to do with the SMTP AUTH setting.
550 5.7.350
Microsoft’s list of bounce codes does not include 5.7.350, the code in 550 5.7.350 Remote server returned message detected as spam. In
one bounce posted to Microsoft’s Q&A site, Exchange Online said it had tried to deliver the message outside Microsoft 365 and the recipient’s server or filter suspected spam. The text after -> was Gmail’s reason, a low-reputation sending domain. That is one example, not Microsoft’s definition of the code. Read the text after -> in your own bounce for the remote server’s reason.
Read next
SMTP Error Decoder
Paste a bounce message, SMTP error code, or wp_mail_failed output. Get the cause, who’s at fault, and the exact fix for WordPress.
SPF for M365 relay
When sending via smtp.office365.com, include Microsoft’s SPF in your domain’s TXT record:
include:spf.protection.outlook.com
Without this, receiving servers may reject your mail as coming from an unauthorised server.
DKIM for M365
Microsoft 365 can sign outbound messages with DKIM on your behalf. Enable this in the Microsoft Defender portal under Email & collaboration → Policies & rules → Threat policies → Email authentication settings, on the DKIM tab. You’ll add two CNAME records to DNS pointing to Microsoft’s signing infrastructure.
Port summary
| Port | Protocol | Use |
|---|---|---|
| 587 | STARTTLS | SMTP AUTH submission; Microsoft’s recommended port |
| 465 | Implicit TLS | Not listed by Microsoft for any of its sending methods |
| 25 | STARTTLS (required for SMTP AUTH; optional for Direct Send and SMTP relay in Microsoft’s method comparison) | SMTP AUTH submission, SMTP relay through a connector, and Direct Send |
For SMTP AUTH submission to smtp.office365.com,
Microsoft lists 587 (recommended) or 25, and says a device or application that defaults to 465 does not support the TLS versions Microsoft requires. Microsoft sets that limit, while the standard,
RFC 8314, recommends implicit TLS for mail submission, on port 465.
Microsoft’s connector setup instructions show TLS/StartTLS enabled for connector relay, although its method comparison lists TLS as optional for SMTP relay.
Read next
DNS Auth Checker for WordPress Email
Check your domain’s SPF, DKIM, DMARC, and MX records. See how you score against Gmail, Yahoo, and Microsoft 365 bulk-sender requirements — with advice written for WordPress.
Related
- SMTP Error Decoder: paste 535 5.7.139, 550 5.7.30, 550 5.7.515 or 550 5.7.350 for a fix
- Microsoft 365 sending service review
- What are DKIM and SPF in WordPress?
Corrections
- 2026-11-25: an earlier version gave the wrong meaning for three codes. It said
550 5.7.515means SMTP AUTH is off; it is Outlook.com’s sender-authentication rejection. It said550 5.7.30means Direct Send to an external recipient; Microsoft documents it for password logins once Basic authentication is permanently disabled, a date it has not announced. It said550 5.7.350means a mail flow rule in the recipient’s Microsoft 365 tenant, an unsupported explanation; one posted bounce reports a spam rejection by the recipient’s server. - 2026-11-25: an earlier version said SMTP AUTH has been off by default since 2023 (Microsoft says for organisations created after January 2020), that Direct Send uses your server’s IP (it connects to the tenant’s MX host), and that SMTP AUTH submission is the method WordPress mailer plugins use (FluentSMTP 2.4.5’s Microsoft connection posts to Microsoft Graph instead).
- 2026-11-25: an earlier version said port 465 is deprecated by RFC. RFC 8314 recommends implicit TLS on port 465 for mail submission; Microsoft does not list that port for Microsoft 365.
- 2026-11-25: an earlier version said port 25 is for Direct Send only. Microsoft also lists it for SMTP AUTH submission and for SMTP relay.
