The short answer
Install one SMTP plugin and connect it to your Google Workspace or Microsoft 365 account using the plugin’s Google or Microsoft sign-in (OAuth), so no mailbox password is stored on your site. Then make sure your domain’s SPF record includes your provider, switch on DKIM signing, add a DMARC record, and send a test to a Gmail address to check all three pass.
If your business email is already on Google Workspace or Microsoft 365, that’s usually the best place for your website’s emails to come from as well. The mail then leaves through servers that Gmail and Outlook already trust, signed as your domain. Getting there takes two jobs: connecting WordPress to the account, and making sure your domain’s records vouch for it. Skip the second one and the emails can still end up in spam.
If you’re not yet sure email is the problem, start with why a contact form says “sent” but nothing arrives. It shows how to tell a broken form from an email that’s going missing. This guide picks up from there, with the set-up itself and the reasons it stops working. It’s part of what I cover under WordPress forms and email.
Is this what you’re seeing?
- You want someone to set up SMTP for WordPress, or connect it to Google Workspace for email, and you’re not sure which option to pick.
- WP Mail SMTP isn’t working: the test email fails, or it says it was sent and nothing arrives.
- Your WordPress emails are going into Gmail spam, even though SMTP is set up.
- Email from the site worked for months, then stopped when nobody had changed the website.
- The SMTP plugin shows an error such as “Could not authenticate”, “SMTP connect() failed” or a message asking you to reconnect.
- Your email moved to Microsoft 365 or Google, and the website’s emails stopped at the same time.
What usually causes it
Signing in with a password the account no longer accepts
The oldest way to connect is “Other SMTP”: the plugin signs in to the mailbox with its username and password. Both providers are moving away from this. Once 2-step verification is turned on, the normal password stops working for SMTP. Microsoft 365 is retiring password sign-in for SMTP, and many Microsoft 365 accounts have it switched off already. How to tell: the test or email log shows “Could not authenticate”, “Authentication failed” or SMTP authentication being disabled.
A Google or Microsoft connection that has expired
The better way is OAuth, where you sign in to Google or Microsoft once and approve the plugin, and the plugin gets a token instead of your password. These connections can still lapse. A Google connection set up as an app in “testing” can expire within days. A Microsoft connection uses a secret that has an expiry date, chosen when it was created. Changing the mailbox password can also cancel the connection. How to tell: the plugin asks you to reconnect, or the log shows a token or “invalid_grant” error, and it started on a date you can’t link to any change on the site.
The mailbox belonged to someone who has left
Sites are often connected using whatever mailbox was to hand: the owner’s, a member of staff’s, or the developer’s. When that person leaves, their mailbox is removed or their licence goes, and the website loses its way of sending. How to tell: the SMTP plugin’s settings show which account is connected. If it’s someone who has gone, that’s your answer.
A From address the account isn’t allowed to use
Google and Microsoft only let a mailbox send as its own address, or as an alias it has been given. Google quietly replaces any other From address with the mailbox’s own. Microsoft refuses to send. How to tell: emails arrive from a different address than the one set in the form, or the log mentions “SendAsDenied” or not being allowed to send as that address.
SPF, DKIM or DMARC not set up for your provider
Sending through Google or Microsoft only helps if your domain’s records say those servers may send for you. Your SPF record needs your provider in it. DKIM signing needs switching on: Google gives you a record to add, and Microsoft gives you two. DMARC tells other mail services what to do with mail that fails. How to tell: send a test to a Gmail address, open it, choose “Show original” from the three-dot menu, and look at the SPF, DKIM and DMARC lines near the top. Each should say PASS.
What you can safely try
Take a backup first. Every step here can be undone. The steps in Google’s or Microsoft’s admin area need someone with admin rights to your business email, so find out who that is before you start.
- Choose which mailbox the site sends from. Ideally it belongs to the business rather than a person, so it doesn’t disappear when someone leaves. An alias such as website@ works if the mailbox is allowed to send as it.
- Use one SMTP plugin, such as WP Mail SMTP, FluentSMTP or Post SMTP. If you find two installed, deactivate the one you’re not using, because they compete to send the same email.
- Pick the plugin’s Google or Microsoft connection rather than “Other SMTP”. Its guide takes you through creating a small app in Google’s or Microsoft’s admin area and approving it. For Google Workspace, set the app to internal use only, so the connection doesn’t expire. For Microsoft 365, write down when the secret expires and put a reminder in the diary. These connections send over the web, so they also get round hosts that block mail ports. Some plugins only include the Microsoft connection in their paid version.
- If you can only use plain SMTP, sign in with an app password made for the website, never the mailbox’s normal password. Google offers app passwords on accounts with 2-step verification, if your admin allows them. Treat it as a stopgap with Microsoft 365. Don’t paste a mailbox password into
wp-config.phpor a theme file either: it sits there in plain text and travels with every backup and copy of the site. - Set the From address to the connected mailbox or its alias, and the From name to your business. Turn on the plugin’s option to force that From address, so every plugin on the site uses it.
- Look up your domain’s SPF record with a free DNS lookup tool. There should be exactly one, starting
v=spf1. For Google it should containinclude:_spf.google.com, and for Microsoft 365include:spf.protection.outlook.com. If you need to change it, edit the one record. Never add a second one. - Switch on DKIM in your provider’s admin area and add the record or records it gives you where your domain is managed. Then add a DMARC record that starts gently, such as
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.co.uk, which reports problems without blocking anything. - Turn on the plugin’s email log, send its test email to a Gmail address, and check “Show original” for three passes. Then send a real enquiry through your contact form.
When to stop and get help
- Nobody knows who the admin is for your Google Workspace or Microsoft 365 account.
- You’d need to change DNS records and aren’t sure what’s there now. A broken SPF record can stop your everyday email, not just the website’s.
- Your DMARC record is already set to quarantine or reject, and the site’s mail is failing it.
- Several systems send email as your domain, such as the shop, a newsletter tool and a CRM, and they all need to be covered without breaking each other.
- The connection asks for permissions you don’t understand, or your admin won’t approve it.
- Everything passes, and Gmail still puts your emails in spam.
A real example
What I find most often is a site that was set up with SMTP once, years ago, using one person’s mailbox and password typed into “Other SMTP”. It worked, so nobody looked at it again. Then the password was changed, 2-step verification went on, or the person left, and the website stopped sending. The form still said “sent”, so nobody noticed. The lasting fix is the same each time: a mailbox that belongs to the business, connected through Google’s or Microsoft’s own sign-in, a note of any expiry date, and the domain’s records checked so the mail is trusted when it arrives.
Getting it fixed
I’ll connect your site to Google Workspace or Microsoft 365 with the provider’s own sign-in, set the From address, check your SPF, DKIM and DMARC records and tell you exactly what to add if any are missing, then test every form with real messages to Gmail and Outlook. See WordPress forms and email for what’s covered. A WordPress repair is a fixed £119, which covers finding the problem and up to 90 minutes of fixing it. Most repairs fit in that, and you’re never charged more without agreeing first.
Questions
Can someone set up SMTP for WordPress without my email password?
Yes, and that’s the better way. With the Google or Microsoft connection, an admin approves the plugin once and no password is stored on the site. I can also do it with a mailbox used only for the website, so I never need access to yours.
My WordPress emails still go into Gmail spam after setting up SMTP. Why?
Usually because SPF or DKIM doesn’t line up with your domain yet, or the From address isn’t the mailbox you connected. Check “Show original” in Gmail. If all three pass, the content may be the issue, for example a message that’s mostly links. Nobody can promise every email reaches the inbox, but these are the usual causes. Password-reset emails have their own quirks, covered in password-reset emails not arriving.
Should I use my Google or Microsoft account, or a sending service?
For contact forms, password resets and a modest number of order emails, your own account is fine. Both have daily sending limits, though, so a busy shop or anything like a newsletter is better sent through a dedicated email sending service, with its own SPF and DKIM records.
Is it safe to let a plugin connect to our email account?
Check what it asks for when you approve it. Some connections ask for wider access to the mailbox than sending alone, which is another good reason to connect a mailbox used only for the website, not someone’s everyday inbox.
Do I need to do anything about Microsoft’s changes to SMTP sign-in?
If your site signs in to Microsoft 365 with a username and password, yes. Microsoft is moving away from that, and the timetable has changed more than once, so I’d switch to the Microsoft connection in your SMTP plugin now rather than wait for it to stop.
Does it matter which SMTP plugin I use?
Less than how it’s connected. WP Mail SMTP, FluentSMTP and Post SMTP all do the job. What matters is one plugin, the provider’s own sign-in, a From address on your domain, and the log switched on. The forms themselves have their own settings too, covered plugin by plugin in WordPress form plugin problems.
Written by Peter Claridge, who fixes WordPress sites for businesses across the UK from Reading. Last checked on WordPress 7.1, November 2026.