WordPress

Why Contact Form Emails from WordPress Don’t Arrive in Microsoft 365

If you’re running a WordPress website and contact form submissions aren’t reaching your Microsoft 365 inbox, you’re likely experiencing email authentication issues. This guide explains why this happens and provides three proven solutions to fix the problem.


Understanding the Problem

When your WordPress website sends contact form emails, several factors can cause Microsoft 365 to block or reject them:

Your Setup

  • Your website domain is the same as your email domain (e.g., website at example.com, email at you@example.com)
  • WordPress is using PHP Mail to send emails (the default method)
  • Your website is hosted on Ecenica WordPress hosting
  • Your email is hosted on Microsoft 365
  • Emails sent from your contact forms are signed its own DKIM key

What’s Going Wrong

Microsoft 365 sees emails coming from your domain, but they’re being sent from your website server rather than Microsoft’s servers. This creates authentication problems:

  1. DKIM mismatch – cPanel signs emails with its own DKIM key, which doesn’t match Microsoft 365’s DKIM records
  2. SPF confusion – Even if you add your website server’s IP to your SPF record, Microsoft may still flag the emails as potentially unauthorised
  3. Source verification – Microsoft 365’s security systems see the email coming from an unexpected source and mark it as unverified

The result: your contact form emails either go to spam, get blocked entirely, or appear with security warnings in Microsoft 365.


Solution Overview

You have three options to fix this issue:

  • Option A: Allowlist Your Server IP – Best for IT administrators with Microsoft 365 access
  • Option B: Use Microsoft 365 SMTP – Best for anyone comfortable installing WordPress plugins
  • Option C: Use a Separate Email Address – Best for quick fixes with minimal configuration

Option A: Allowlist Your Website Server in Microsoft 365

This option tells Microsoft 365 to always trust emails from your website server’s IP address.

Requirements

  • Access to the Microsoft 365 Security Portal
  • Administrator permissions in Microsoft 365

Steps

  1. Log in to the Microsoft 365 Security Portal
  2. In the sidebar on the left, expand Email & Collaboration
  3. Navigate to Policies & rules > Threat Policies > Anti-spam
  4. Click Connection filter policy
  5. Click Edit connection filter policy
  6. Under Always allow messages from the following IP addresses or address range, add your website server’s IP address
  7. Click Save

To find your server IP address:

  • Log in to your Ecenica Dashboard
  • Go to your hosting service details
  • Your server IP address is listed in the service information

Pros and Cons

Pros:

  • Permanently resolves the issue for all forms and WordPress emails
  • No changes needed to your WordPress site
  • Maintains your existing email setup

Cons:

  • Requires Microsoft 365 administrator access
  • If your client manages their own Microsoft 365, you’ll need to ask them to make this change
  • Must update if your server IP changes

Best for: Situations where you or your client have full control over Microsoft 365 settings.


Option B: Configure WordPress to Use Microsoft 365 SMTP

This option makes WordPress send all emails through Microsoft 365’s servers instead of your website server, ensuring perfect email authentication.

Requirements

  • A Microsoft 365 email account (can be your existing one or a dedicated account for forms)
  • SMTP credentials (username and password)
  • Ability to install WordPress plugins

Steps

  1. Ask your client to provide SMTP details for a Microsoft 365 email account
  2. Follow our guide: How to Configure WordPress Email with SMTP
  3. Configure the SMTP plugin with your Microsoft 365 credentials

Once configured, all WordPress emails (contact forms, notifications, password resets) will be sent through Microsoft 365’s servers with proper authentication.

Pros and Cons

Pros:

  • Perfect email authentication—emails come directly from Microsoft 365
  • Works for all WordPress emails, not just contact forms
  • No Microsoft 365 admin portal changes needed
  • Emails appear in your Microsoft 365 Sent folder

Cons:

  • Requires installing and configuring a WordPress plugin
  • Needs SMTP credentials (username/password)
  • Relies on WordPress plugin staying updated

Best for: Anyone who wants reliable, authenticated email delivery and doesn’t mind configuring a plugin.


Option C: Use a Separate Email Address for Forms (Recommended for Quick Fixes)

The simplest solution: create a separate email address on your Ecenica hosting and configure your contact forms to send from that address instead.

How It Works

Instead of forms sending from noreply@example.com (your Microsoft 365 domain), they send from forms@sites.example.com (a subdomain hosted on Ecenica).

Steps

  1. Log in to your [Ecenica Dashboard](https://my.ecenica.com/)
  2. Create a new email account, such as:
    • forms@sites.example.com
    • website@forms.example.com
    • contact@web.example.com
  3. In your WordPress contact form settings, change the “From” email address to your new email
  4. Set the “Reply-To” address to your Microsoft 365 email

When someone fills out your contact form:
– The email is sent from forms@sites.example.com (fully authenticated by Ecenica)
– The email arrives at your Microsoft 365 inbox
– When you click reply, it goes to the customer’s email address (not the forms@ address)

Pros and Cons

Pros:

  • Very easy to set up
  • No Microsoft 365 changes needed
  • No WordPress plugins required
  • SPF, DKIM, and DMARC are automatically configured by Ecenica
  • Emails are fully authenticated and trusted

Cons:

  • Forms won’t appear to come from your main domain
  • Requires creating an additional email account
  • Small monthly cost for the email account (if not included in your hosting)

Best for: Quick fixes, clients who don’t want to share Microsoft 365 credentials, or anyone who wants the simplest solution.


What About SendGrid or Other Services?

Some guides recommend using services like SendGrid, Mailgun, or Amazon SES. While these can work, we’ve found:

  • Free tiers from these services often use shared IP addresses that are frequently marked as spam
  • Paid tiers work well but add ongoing costs
  • Configuration can be more complex than the options above

If you’re already using one of these services successfully, that’s fine. But if you’re just getting started, we recommend Options A, B, or C above.


Frequently Asked Questions

Why can’t I just add my server IP to my SPF record?
You can, and you should if you’re using Option A. However, SPF alone won’t solve the problem if Microsoft 365’s DKIM checks are failing. The DKIM mismatch (cPanel signing vs Microsoft 365 signing) can still cause issues.

Will this affect other WordPress emails like password resets?
Option B (SMTP) fixes all WordPress emails. Options A and C only fix emails sent from your contact forms unless you configure other WordPress notifications to use the same sending address.

I’ve allowlisted the IP but emails still aren’t arriving. What now?
Check Microsoft 365’s message trace to see where emails are going. They may be caught by additional rules or ending up in Junk. Contact Ecenica support with your findings and we’ll help investigate.

Can I use my main email address with Option B?
Yes, but we recommend creating a dedicated account like wordpress@example.com so you can track WordPress-sent emails separately and revoke access if needed.

How do I know which option to choose?
If you have Microsoft 365 admin access, use Option A. If your client won’t share admin access or SMTP credentials, use Option C. If you want the most reliable long-term solution and have SMTP credentials, use Option B.

Will this cost extra?
Option A is free. Option B is free (just needs plugin installation). Option C requires an additional email account, which may be included in your hosting or cost a small monthly fee.

What if my website domain is different from my email domain?
If you’re using different domains (e.g., website at mywebsite.com, email at mybusiness.com), you’re less likely to have this issue. But if problems persist, Option B or C will still work.

Do I need to change my DNS records?
For Option C, you might need to add DNS records for your subdomain if it’s not already configured. Ecenica support can help with this if needed.


Need Help?

If you’re unsure which option is best for your situation or need help implementing any of these solutions, contact Ecenica support and we’ll guide you through the process.

Was this guide helpful?

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London