How to prevent mail from WordPress website from being flagged as spam on Exchange online server

I have a website; let’s call it abc.com. It’s e-mail is handled by Office365. I recently migrated it from a Sharepoint environment to a different webhost (GoDaddy). I have tried using the WP Mail SMTP plugin option to send e-mails, but it fails to send.

My settings are:

Read More
smtp: smtp.office365.com
port: 587
encryption: use TLS
authentication: use smtp

Sending fails with the error:

SMTP ERROR: Failed to connect to server: Connection refused (111)

Using the default wp mail with the settings below works to send to e-mail addresses outside the domain, but messages get flagged as spam on addresses within the domain.

header = 'From: '.get_option('blogname').' <wordpress@abc.com>'

I have e-mail routing set to Remote Mail Exchanger. I’ve tried adding the address wordpress@abc.com to Exchange’s allowed list/whitelist, and I even tried adding the host IP to trusted IPs on the server – but it still doesn’t work.

Related posts

2 comments

  1. As far as I’m aware, GoDaddy do not let you send mail to external SMTP providers. If you’re not able to choose another host (which I’d recommend if you can!), you’ll need to use wp mail and send all mail to a local address at the same domain, hosted with GoDaddy.

    If you wanted to, you could then set up an alias to send it elsewhere.

    There’s some more background on this over at wordpress.org, such as this thread and this thread.

    EDIT

    Just realised that the Postman SMTP plugin claims it can get around GoDaddy’s filtering using HTTPS:

    “Even hosts that block the standard SMTP ports, like GoDaddy or Bluehost, can’t stop your email as Postman can deliver via HTTPS if it can’t use SMTP.”

    So maybe give that plugin a go instead. 🙂

  2. I ended up using the default wp mail.On the client o365 admin I added the email address to the whitelist. Made the mail rule priority over the default spam filter rule.I even went a step further to whitelist the IP but that’s overkill I think.

Comments are closed.