Skip to content

Configure WordPress SMTP to send emails via Microsoft 365

WordPress often does not send your emails, and that’s a big problem. That’s because the hosting has unreliable SMTP (Simple Mail Transfer Protocol). The solution is to send emails without any delivery problems from your WordPress website when installing an SMTP plugin and configuring the SMTP to send emails via Exchange Online. This article will show how to configure WordPress SMTP to send emails via Microsoft 365.

WordPress SMTP prerequisites

The below prerequisites are essential:

  • Purchase a Microsoft 365 user license that will be used for authentication purposes.

Note: The SMTP configuration will not work on a trial or developer tenant account. It will also not work from an unlicensed mailbox, unless it’s a shared mailbox. The shared mailbox needs to have a licensed user as member with Send As permissions, so you can use that for the Microsoft 365 authentication and get the access token.

1. Download WordPress plugin Fluent SMTP

Install the Fluent SMTP WordPress plugin:

  1. Login to your WordPress site
  2. Click Plugins from the menu
  3. Click Add New
  4. Search for fluent smtp
  5. Click Install Now
Download WordPress plugin Fluent SMTP
  1. Click Activate Plugin
Download WordPress plugin Fluent SMTP

Next, we need to configure the plugin Fluent SMTP for it to work.

2. Configure Fluent SMTP WordPress plugin

Configure the Fluent SMTP plugin to use Microsoft 365 (Exchange Online) as the mail server.

  1. Click on Settings > Fluent SMTP
  2. Choose Microsoft
Configure Fluent SMTP WordPress plugin
  1. Type From Email info@365info.com
  2. Type From Name o365info

Note: For the sender mail, you can choose a licensed or unlicensed shared mailbox. The important difference is that for an unlicensed shared mailbox, the user needs to have a licensed mailbox with Send As permissions.

For example, you have an unlicensed shared mailbox with a couple of members. The member you will authenticate with Microsoft 365 to get an access token in the next step must have a licensed mailbox and Send As permission to the shared mailbox. You will use that account later in the authentication process.

Configure Fluent SMTP WordPress plugin

Before going further, we need to create an Application Client ID and Application Client Secret. Therefore we need to register a new application in Microsoft Azure and create a new client secret.

Create new application

  1. Sign into Microsoft Entra admin center with your admin credentials
  2. Open Azure Active Directory
  3. Click Applications > App registrations
  4. Click New registration

Note: Sign into the Microsoft Entra portal as admin, or you need to grant consent to the application registration.

Configure Fluent SMTP WordPress app registration
  1. Type the name FluentSMTP
  2. Select Accounts in any organizational directory and personal Microsoft accounts
  3. Select Web
  4. Copy and paste the (App Callback) URL from Fluent SMTP configuration page
Configure Fluent SMTP WordPress register application

A notification appears: Successfully created application FluentSMTP.

Application Client ID

You will be redirected to the newly created App registrations (FluentSMTP)

  1. Copy Application (client) ID
Configure Fluent SMTP WordPress app Client ID
  1. Click Certificates & secrets
  2. Click Client secrets
  3. Click New client secret
  4. Type the description FluentSMTP Secret
  5. Select 730 days (24 months)
  6. Click Add
Configure Fluent SMTP WordPress Client Secret app

You will get a notification: Successfully updated application FluentSMTP Secret credentials

Application Client Secret

There is 1 Client secret available.

  1. Copy the Client secret Value

Note: The Client Secret Value can’t be viewed after you leave the page. It is important to save the Value somewhere, or you won’t see it again.

Configure Fluent SMTP WordPress Client Secret Value

Authenticate with Microsoft 365

Go back to the Fluent SMTP configuration page and fill in the information:

  1. Paste the Application Client ID
  2. Paste the Application Client Secret value
  3. Click Authenticate with Office365 & Get Access Token
Configure Fluent SMTP WordPress plugin

The Microsoft prompt with Permission requested will pop up.

Note: You must sign in with a purchased licensed mailbox.

  1. Click Accept
Configure Fluent SMTP WordPress plugin authentication
  1. Copy the Access Code
Configure Fluent SMTP WordPress access code
  1. Paste it under Access Token
  2. Click Save Connection Settings
Configure Fluent SMTP WordPress plugin access token

Verify active Microsoft 365 connection

Now you connected Fluent SMTP with your Microsoft account.

  1. Go to Settings > Fluent SMTP
  2. You can see the Active Email Connections with the provider and from email
  3. The General Settings can be changed
Active email connections

3. Send test mail using Microsoft 365 SMTP

We will send a test email from Fluent SMTP plugin with the below steps:

  1. Go to Settings > Fluent SMTP
  2. Click the tab Email Test
  3. Choose From info@o365info.com
  4. Type Send To john.doe@gmail.com
  5. Click Send Test Email

Note: The From field is selectable from a dropdown. You can only choose the email address you added in the first step under Sender Settings > from email field.

Send test email from plugin

4. Confirm send mail with Fluent SMTP

The Fluent SMTP WordPress plugin shows that the test email has been successfully sent.

Test email sent succesfully

The below image shows that the recipient received your test email successfully.

Test email received succesfully

Open Outlook and go to your Sent Items folder, where you will find the test email.

WordPress plugin Fluent SMTP email test sent

You can successfully send an email from your WordPress site via Microsoft 365.

Read more: How to simulate spam mail »

Conclusion

You learned how to configure a WordPress SMTP plugin to send emails via Microsoft 365. Remember that you must have a purchased licensed mailbox to configure the SMTP, otherwise it will not work.

Did you enjoy this article? You may also like Fix Outlook error 500 repeating redirects. Don’t forget to follow us and share this article.

o365info Team

o365info Team

This article was written by our team of experienced IT architects, consultants, and engineers.

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *