Connecting to Microsoft 365 / Outlook

Introduction

This article guides you through using Gravity SMTP to integrate your website email connection to your Microsoft 365 / Outlook account. This will allow your website to use Microsoft’s API to generate secure authentication for your site’s outgoing email.

About the Microsoft 365 / Outlook Service

Microsoft provides more than just email address and inbox services; they also offer a tool to enhance the deliverability of your emails. This tool operates via an API, so you don’t need to input sensitive login information into your WordPress admin area, making it more secure than traditional SMTP methods. Additionally, the Microsoft/Outlook mailer can send up to 1,000 emails per minute, significantly exceeding the limits of most other mailers.

Caveats

Outlook.com email accounts are not recommended for website-critical email functions.

Outlook.com email accounts (and many other free mail solutions) come with outgoing volume limitations, which may change without notice and are affected by Microsoft’s usage and spam prevention rules. This service may be sufficient to trial for websites with small or moderate outgoing email requirements or perhaps for notification needs just to a webmaster.

We suggest using services built specifically for transactional email sending, including time-sensitive delivery, critical for reception, or high volume or frequency, such as the other services integrated with Gravity SMTP.

Integration Steps

To allow Gravity SMTP to send messages from your website via Microsoft’s API, you will need to complete the following steps:

  1. Create a Microsoft account (you can skip this step if you already have an account.)
  2. Obtain your Azure Application ID.
    This will be required in settings to create the link between Microsoft 365 / Outlook and your website via Gravity SMTP. Refer to this help guide for instructions on how to find that Application ID key in your Azure account.
  3. Complete the Gravity SMTP Settings screen.
    Go to Gravity SMTP → Settings → Integrations and click the settings cog on the Microsoft 365 / Outlook card. This will open a pop-up modal with all the fields required for SMTP to connect with Microsoft 365 / Outlook. See below for a description of these settings.
  4. Click “Save Changes” button.
    You should be returned to the Settings card page after saving, and the Configured text should show at the bottom of the settings card for Microsoft 365 / Outlook. If your settings card still shows Not Configured, check your settings and the steps above to ensure everything has been completed.
  1. Enable the integration using the on-off toggle (if you are ready to use it).
    Click the toggle on the settings card to turn on Microsoft 365 / Outlook integration. This will show Microsoft 365 / Outlook as Connected. You can then test using the Gravity SMTP Tools, or using your website. Note that only one integration can be active at a time, so toggling one integration on will toggle any other active integration off.

Microsoft 365 / Outlook Settings Reference

Microsoft 365 / Outlook Settings Reference
TagDescription
Application IDThe Client Secret provided by Azure that is used to authenticate with the Microsoft 365 / Outlook API. See the “Steps” section for the process of obtaining this. Required.
Client SecretThe Client Secret provided by Azure that is used to authenticate with the Microsoft 365 / Outlook API. See the “Steps” section for the process on obtaining this. Required.
Redirect URI (Personal Accounts)If your app is set up to support Personal Accounts, copy this URL and enter it as a Redirect URI in your App Settings. A Redirect URI (Uniform Resource Identifier) is a specific URL within your application where the user is sent after they have authenticated with an external service, such as Microsoft 365 / Outlook. Read Only.
Redirect URI (School or Work Accounts)If your app is set up to support School and Work accounts, copy this URL and enter it as a Redirect URI in your App Settings. Read Only.

Integration Settings

Image showing integration settings for Microsoft 365 / Outlook after the connection was made.
TagDescription
From EmailThe from: email associated with outgoing messages. This email address needs to be the connected account address on that account.
Only applied when from: property is not explicitly set in the message being processed.
Force EmailIf enabled, the From Email will override any plugin settings for all outgoing email messages.
From NameThe from: name associated with outgoing messages.
Only applied when from: property is not explicitly set in the message being processed.
Force NameIf enabled, the From Name will override any plugin settings for all outgoing email messages.