WP Mail SMTP Office 365 Not Working Fix
In this article
Yes, WP Mail SMTP with Office 365 can be fixed when not working—typically by correcting SMTP settings, enabling less secure apps (if applicable), or using OAuth 2.0 authentication. Most issues stem from incorrect configuration, authentication blocks, or plugin conflicts.
What You'll Need
- Admin access to your WordPress site
- Active Office 365 (Microsoft 365) email account
- WP Mail SMTP plugin installed and activated
- App password or OAuth 2.0 credentials (if two-factor authentication is enabled)
- Access to your email provider’s admin settings (for enabling SMTP or app access)
Step-by-Step
- Log in to your WordPress dashboard and navigate to WP Mail SMTP > Settings. Ensure the plugin is properly installed and activated.
- Select Other SMTP as the mailer option. While WP Mail SMTP supports direct Office 365 integration via the 'Microsoft' mailer, it often fails due to OAuth misconfigurations. Using 'Other SMTP' with manual settings is more reliable.
- Enter your Office 365 email address in the From Email field. This should match the email you're authenticating with.
- Set the SMTP Host to
smtp.office365.com. Double-check the spelling and ensure there are no extra spaces. - Set the SMTP Port to 587. This is the standard port for TLS encryption with Office 365.
- Choose Encryption as TLS. Do not use SSL or 'No encryption'—Office 365 requires TLS on port 587.
- Enable Authentication. This must be turned on for Office 365 to accept login credentials.
- Enter your full Office 365 email address as the SMTP Username.
- Enter your Office 365 account password as the SMTP Password. If you use two-factor authentication (2FA), you must generate an app password instead of using your regular password.
- Click Save Settings to apply the changes.
- Go to WP Mail SMTP > Email Testing and send a test email. Use a non-Office 365 email (like Gmail) to avoid internal routing issues.
- Check the recipient inbox and spam folder. If the test email fails, review the WP Mail SMTP debug log under Email Log for error messages.
Common Mistakes
- Using port 465 with TLS: Office 365 requires port 587 with TLS, not SSL on port 465.
- Entering incorrect SMTP credentials: The username must be the full email address, and the password must be valid or an app-specific password if 2FA is on.
- Disabling authentication: Authentication must be enabled—Office 365 will reject unauthenticated connections.
- Using the 'Microsoft' mailer without proper OAuth setup: This method requires Azure app registration and is complex; 'Other SMTP' is simpler and more stable.
- Not checking email account restrictions: Some Office 365 plans block SMTP AUTH by default. Ensure SMTP is enabled in the Microsoft 365 admin center.
Tips
- Use an app password if two-factor authentication is enabled. Regular passwords won’t work.
- Enable SMTP AUTH in the Microsoft 365 admin center under Users > Active Users > [User] > Mail tab > SMTP AUTH. Toggle it on if disabled.
- Test with a simple subject and body—avoid HTML or links in initial tests to rule out content filtering.
- Use the WP Mail SMTP debug log to identify exact error codes. Common errors include '5.7.3 Authentication unsuccessful' or 'Connection timed out'.
- Keep WordPress and the WP Mail SMTP plugin updated—older versions may have bugs or deprecated security protocols.
Troubleshooting
If the test email fails, start with the basics. First, ensure your site can reach smtp.office365.com—some hosts block outbound SMTP. Contact your hosting provider if connection timeouts occur. Next, verify your Office 365 account is active and can send emails via Outlook Web Access.
If you see 'Authentication failed' errors, recheck your username and password. Try logging in to Outlook on the web with the same credentials. If that fails, reset your password. If 2FA is on, generate a new app password and update it in WP Mail SMTP.
If emails send but go to spam, ensure your domain has SPF, DKIM, and DMARC records set up in DNS. Office 365 handles SPF automatically if you're using their DNS, but custom domains may need manual configuration.
If the plugin settings revert or fail to save, check for JavaScript errors in the browser console. Disable other plugins temporarily to rule out conflicts. Clear any caching plugins or CDN caches after saving settings.
Still not working? Enable WP Mail SMTP’s debug mode under Settings > Debug. This logs full SMTP conversation details, which can reveal if the server rejects authentication or drops the connection.
Frequently Asked Questions
Does WP Mail SMTP support Office 365?
Yes, via 'Other SMTP' settings or the 'Microsoft' mailer. The 'Other SMTP' method is more reliable for most users.
Why is my Office 365 email not sending from WordPress?
Most often due to incorrect SMTP settings, disabled SMTP AUTH in Microsoft 365, or using a regular password when 2FA is enabled.
Do I need an app password for Office 365 SMTP?
Yes, if two-factor authentication is enabled. Regular passwords won’t work—generate an app password in your Microsoft account settings.
What SMTP settings should I use for Office 365?
Host: smtp.office365.com, Port: 587, Encryption: TLS, Authentication: On, Username: full email, Password: app password (if 2FA).
Can I use OAuth 2.0 with WP Mail SMTP and Office 365?
Yes, but it requires registering an app in Azure AD, which is complex. For most sites, SMTP with app passwords is simpler and more stable.
Are there Office 365 plan restrictions on SMTP?
Yes, some business plans disable SMTP AUTH by default. Enable it in the Microsoft 365 admin center under the user’s mail settings.