How to Fix WordPress Form Email Issues with Office 365 and Google Workspace

If your WordPress contact form emails aren’t arriving in your inbox or are getting marked as spam, you’re not alone. This is one of the most common issues faced by website owners and agencies, especially when they use Office 365 (Microsoft 365) or Google Workspace (Gmail) for business email.

The problem isn’t your form plugin. It’s how WordPress sends email by default. Let’s understand why it happens and how to fix it permanently.

💡 Why WordPress Emails Fail to Send

Here’s what happens when you send an email from WordPress:

  • The wp mail() function is one of your WordPress files’ core programs. Plugins use the wp mail() method to send emails to WordPress.
  • WordPress sends this email request to your hosting provider’s server, which processes it with PHP email.
  • Finally, PHP instructs the hosting provider’s mail server, and the email router on your server sends the emails to the recipients.

Many hosting providers do not have an email infrastructure, and many hosting servers automatically prohibit PHP emails. That’s why you should never send emails using WordPress. Unfortunately, it’s a familiar yet irritating problem for WordPress users—but one that you can resolve.

The best way to make sure your form emails reach inboxes is to send them through SMTP — the same protocol your regular email client uses.

Instead of letting WordPress send emails on its own, SMTP connects your website directly to your Office 365 or Google Workspace account, verifying every message with proper credentials.

⚙️ Step 1: Install an SMTP Plugin

To connect WordPress with Office 365 or Google Workspace, you’ll need an SMTP plugin.

Recommended options:

  • WP Mail SMTP by WPForms
  • Post SMTP Mailer/Email Log
  • FluentSMTP

After installing one of these plugins:

  1. Go to your WordPress Dashboard → WP Mail SMTP → Settings.
  2. Choose your mailer — either Outlook / Microsoft 365 or Gmail / Google Workspace.

📧 Step 2: Configure Office 365 (Microsoft 365)

If your email address looks like you@yourdomain.com and is hosted by Microsoft, follow these steps:

  1. Choose Outlook / Microsoft 365 as your mailer in the plugin.
  2. The plugin will ask for:
    • Client ID
    • Client Secret
    • Tenant ID
    • Redirect URI

You’ll get these from the Azure Portal:

How to Get Your Office 365 Credentials

  1. Log in to the Azure Portal
  2. Go to Azure Active Directory → App registrations → New registration.
  3. Enter an app name (e.g., WordPress Mailer).
  4. Under Redirect URI, paste the URI provided by your SMTP plugin.
  5. Copy your Client ID and Tenant ID.
  6. Go to Certificates & Secrets → New Client Secret, and copy the secret value.
  7. Paste these into the SMTP plugin fields and click Authorize.

✅ Once done, send a test email to confirm it’s working.

💼 Step 3: Configure Google Workspace (Gmail for Business)

If you use Google Workspace (formerly G Suite), here’s how to connect:

  1. Choose Gmail / Google Workspace as your mailer.
  2. The plugin will need:
    • Client ID
    • Client Secret
    • Redirect URI

How to Get These from Google Cloud

  1. Visit the Google Cloud Console
  2. Create a New Project (e.g., WordPress Mailer).
  3. Go to APIs & Services → Enable APIs and Services → Gmail API.
  4. Under Credentials → Create Credentials → OAuth Client ID.
  5. Choose Web application, and add your plugin’s Redirect URI.
  6. Copy the Client ID and Client Secret, then paste them into your SMTP plugin.
  7. Click Authorize, and allow access to your Google account.

✅ Send a test email — you should receive it instantly in your inbox


✉️ Step 4: Set Your “From Email” and “From Name”

In the SMTP plugin settings:

  • Set From Email as the same email address you’re authenticating (e.g., info@yourdomain.com).
  • Enable “Force From Email” to ensure consistency.
  • Set a friendly “From Name,” like your company name or website name.

Avoid using noreply@... addresses — they often trigger spam filters.

🌐 Step 5: Improve Email Deliverability (Optional but Recommended)

Even with SMTP, your domain should have proper DNS records to verify your emails.
Add these to your domain’s DNS settings:

For Office 365:

v=spf1 include:spf.protection.outlook.com -all

For Google Workspace:

v=spf1 include:_spf.google.com -all

Also, make sure DKIM and DMARC records are added according to your email provider’s documentation.
These records tell receiving mail servers that your emails are authentic — reducing spam and bounce issues.


🔍 Step 6: Test Your Setup

Most SMTP plugins include a built-in Email Test feature.
Go to WP Mail SMTP → Email Test, send a test message, and check your inbox.

If it’s delivered successfully, your WordPress forms (Contact Form 7, WPForms, Gravity Forms, etc.) should now send emails reliably.