Are you looking for a way to configure Microsoft Office 365 for WordPress emails? If so, you are at the right place!

Instead of using the default WordPress mail function, the Microsoft Office 365 SMTP server is a better option to improve WordPress email deliverability.

office 365 for wordpress

In this guide, we will show you how to set up Microsoft Office 365 for WordPress emails in three easy steps. Also, we’ll explain what the Microsoft Office 365 email service is, why you should use it with WordPress, and what prerequisites you have to meet to configure it.

Are you ready? Let’s get started!

What is Exactly the Microsoft Office 365 Email Service?

Microsoft Office 365 is a cloud-based suite of productivity tools that includes email, calendar, contacts, and more. You can use Office 365 to create and manage your professional email accounts with your own domain name. For example, you can have an email address like john@yourdomain.com instead of john@hotmail.com.

Office 365 uses Exchange Online as its email service, a hosted solution offering high availability, security, and compliance. Exchange Online supports SMTP (Simple Mail Transfer Protocol), the standard protocol for sending and receiving emails over the Internet.

You can connect your Office 365 account with WordPress via APIs. It means you do not need to enter passwords or login information in the WordPress settings (making it more secure than conventional SMTP configuration).

IMPORTANT: You have to set up the SPF and DKIM values if you use a paid account with a From email that has your own domain name. For more details, please refer to Microsoft’s SPF documentation and DKIM documentation.

Why Should You Use Microsoft Office 365 to Send WordPress Emails?

As we know, WordPress is a CMS (Content Management System), not an ESP (Email Service Provider). Thus, sending emails is not its main functionality.

That’s why most WordPress users face the lower email deliverability issue. The reason is that WordPress needs a proper email delivery system. In WordPress, the process of sending an email goes like this:

  1. WordPress plugins use the PHP-based wp mail() function for email transmission by default.
  2. Then, WordPress passes your email request on to your provider’s server using PHP mail().
  3. And finally, PHP commands/communicates your server’s email router and your hosting provider’s mail server to deliver emails.

The problem is that most hosting providers don’t have sufficient infrastructure to support email, and most hosting servers block PHP emails by default. Therefore, you should avoid sending emails using WordPress’s default mail function. Fortunately, the easiest solution to this problem is to install the Post SMTP plugin, which lets you route your emails through the SMTP server of your choice.

SMTP stands for Simple Mail Transfer Protocol, the global standard for email transmission over the Internet. In case your web hosting company does not offer email hosting, simply use the Post SMTP plugin to send WordPress emails via your preferred email service, such as Microsoft Office 365, Gmail, Amazon SES, Brevo (formerly Sendinblue), PostMark, MailGun, SparkPost, Mailgun, etc.

Post SMTP plugin is a very easy-to-use and reliable SMTP WordPress Plugin for improving WordPress email deliverability.

Prerequisites for Configuring Microsoft Office 365 for WordPress Emails

Before you set up Microsoft Office 365 for WordPress emails, there are a few things you need to consider, such as:

  • SSL(HTTPS) Certificate Enabled: You must have HTTPS (SSL/TLS) enabled on your website.
  • Office 365 subscription: An active Office 365 subscription that includes Exchange Online with administration rights to access SMTP. Also, make sure that the email address of your Office 365 account and WordPress must be the same; otherwise, you won’t be able to send emails.
  • Post SMTP Plugin Installed: You need to install and activate the Post SMTP plugin on your WordPress site. If you don’t know how, check out our Post SMTP installation guide. Don’t configure it. Only install and activate.

NOTE: Before moving forward, make sure you have everything ready because any incompatibility can cause problems with the configuration process and email deliverability.

Check Out How Post SMTP Makes 365 WordPress Integration a Breeze!

Set Up Microsoft Office 365 for WordPress Emails in 3 Easy Steps

Now that you have everything ready, let’s see how to configure Microsoft Office 365 for WordPress emails in just three easy steps:

Step #1: Install and Activate the Post SMTP Office 365 Extension

To install the Post SMTP Office 365 extension on your WordPress site, follow the steps below:

  • Go to the Post SMTP → Get Pro Bundle in your WordPress dashboard. It will take you to the Post SMTP Pro pricing page, as shown below.
Post SMTP Pro pricing
  • Select your desired subscription plan and click Buy Now. Remember that the lifetime pricing option is the best value for your money.
  • After completing the purchase, you will receive an email with your subscription details, the download link for the .zip file, and a license key.
  • Go to your WordPress dashboard, navigate to Plugins → Add New Plugin, and click the Upload Plugin button.
  • Select the Choose File button and select the zip file titled (i.e., post-smtp-extension-office365-premium.1.3) that you downloaded from the link in the email.
Upload plugin button
  • Click on the Install Now button and wait for the installation process to finish.
  • After installation, click the Activate Plugin button and enter your license key in the License Key field. Finally, hit the Activate License button to validate your license.
Activate license button

Now, go ahead and generate new APIs in your Azure portal by following the next step.

Step #2: Create New APIs in Your Azure Portal

For API generation, you need to register a new app in the Azure portal. This app will allow you to connect your WordPress site with your Office 365 account via APIs.

  • Go to the Azure Portal and sign in with your Office 365 credentials.
  • Click on the App Registrations button at the bottom of the page.
App registrations button
  • To register, select the New Registration tab at the top of the page.
New registration tab
  • Enter a name for your app in the Name field. For example, you can name it Post SMTP Office 365.
  • Select the “Accounts in any organizational directory (Any Microsoft Entra ID tenant – Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)” option.
  • Under Redirect URI, select the Web from the drop-down and then enter your WordPress site domain name, such as “https://yourdomainname.com/wp-admin,” as the redirect URI.
Register button
  • Then, hit the Register button to create new APIs.
  • Upon registration, don’t forget to copy the Application (client) ID and save it on a notepad or sticky note, which we will use later in the Post SMTP Office 365 configuration process.
Application (client) ID option
  • Now, select the Certificates & Secrets option from the left sidebar.
  • Click on the + New Client Secret button.
New client secret button
  • Provide Description (i.e., Post SMTP Office 365) and Expiration Time, then hit Add.
Client secret button
  • On the subsequent screen, copy the Client Secret Value under the Value column of Client Secrets.
Value column of client secrets

Note: Remember, during the entire process above, you’ve copied two values, Application (client) ID and Client Secret Value, which we will use in the Post SMTP setup wizard while connecting the Office 365 SMTP mailer to WordPress.

Step #3: Add Office 365 Details in Your Post SMTP Setup Wizard

This is your final step to set up Office 365 to send WordPress emails: 

  • Go to your WordPress dashboard and navigate to Post SMTP → Start the Wizard.
  • Select Office 365 API as your SMTP mailer and click the Continue button.
Continue button
  • Enter your email address and name in the From Email Address and From Name fields, respectively. These are the details that will appear in your outgoing emails.
From email address and from name fields
  • Paste the Application (client) ID and the Client Secret (Value) that you copied from the Azure portal.
  • Also, enter the exact domain in the Redirect URI field that you’ve added in the API creation process in Azure Portal.
Connect to Office 365 button
  • Now, click on the Connect to Office 365 button to authorize Post SMTP to access your Office 365 account.
  • After authorizing, you’ll be returned to the Post SMTP setup wizard. Click on Save and Continue to proceed.

Congratulations! You’ve now successfully set up Microsoft Office 365 for WordPress emails. Moving forward, simply send a test email to validate its delivery.

Test WordPress Email Deliverability

On the Send Test Email Screen, enter the email address of the recipient in the Recipient Email Address field and hit the Send Test Email button.

Send test email button

Upon successful completion, click on the Finish button, and you are good to go.

Bottom Line – Install Post SMTP Office 365 Extension For Reliable WordPress Email Delivery

Microsoft Office 365 is an excellent choice for sending WordPress emails as it offers improved deliverability, enhanced security, seamless integration, and flexible pricing. However, you cannot configure Microsoft Office 365 for WordPress Emails without using Post SMTP Office 365 Extension.

To connect Post SMTP with Office 365, install and activate the Post SMTP Office 365 extension on your WordPress site. This extension enables you to use the OAuth 2.0 protocol for authentication and avoid storing your password in the WordPress database.

We hope this article helped you learn how to set up Microsoft Office 365 for WordPress emails quickly and easily. If you have any questions or technical difficulties, don’t hesitate to contact us for expert assistance with all your WordPress SMTP configurations.

Frequently Asked Questions

How do I set up my Office 365 email for WordPress?

To set up your Office 365 email for WordPress, download and install the Post SMTP plugin and the Post SMTP Office 365 extension on your WordPress site. Then, register a new app (to get APIs) in your Azure portal and add your Office 365 details in your Post SMTP setup wizard.

How do I set up an email service in WordPress?

If you want to set up an email service in WordPress, you first need to choose an email service provider that supports SMTP, such as Gmail/Google Workspace, Amazon SES, MailGun, Microsoft 365, etc. Then, install the Post SMTP plugin on your WordPress site. After that, configure your SMTP settings and test your email delivery. For more details, please read how to configure SMTP for WordPress to send emails.

What are Office 365 SMTP settings?

When using an external application or device to send emails from your Office 365 account, you need to use the SMTP settings, which are as follows:

SMTP server: smtp.office365.com
SMTP port: 587 (recommended) or Port 25
SMTP encryption: TLS/StartTLS 
SMTP username: Your Office 365 email address
SMTP password: Your Office 365 password

What is the SMTP domain name for Office 365?

The SMTP domain name for Office 365 is the domain name that you use for your Office 365 email address. For example, if your email address is john@yourdomain.com, your SMTP domain name is yourdomain.com. However, if you want to know the SMTP server domain address for Office 365, then it's smtp.office365.com.