This article will walk you through the steps to connect your website to your Microsoft 365 email account.
Why is this important?
Email providers like Google, Microsoft, Yahoo, etc. all require emails to be authenticated. This is no longer a ‘nice to have’. This is a requirement. If an email is not authenticated the email provider will flag, mark as spam, or block the email from being delivered. Websites are not email servers. While websites can send emails, these emails are not authenticated. So emails sent from a website are very unreliable. Connecting your website via SMTP authenticates emails sent from your website as legitimate, so they are reliably delivered.
How to connect Microsoft 365 to your website
- Go to your website, Login, then visit the backend dashboard of your website.
- At the bottom of the black left admin menu click Post SMTP.
- Click the blue button Setup the Wizard.
- Choose Office365 API, then click Continue.
- In the From Email field enter a real email, not a fake or alias email.
- In the From Name enter your agency’s name.
- Underneath the Application (Client) ID field click Find client id.
- You will be redirected to your Azure Portal to get your two keys. Log into your Azure Portal using the same email address that you entered in the From Email above (step 5). Once logged in, you will see this screen.

Click on App Registrations, or use the blue search bar at the top to search for App Registrations. You will be redirected to the app registration page. - On the App Registrations page click New Registration.

- On the Register an Application page enter a name like Agency Website in the Name field.
- Select the 3rd radio button: Accounts in any organizational directory (Any Microsoft Entra ID tenant – Multitenant) and personal Microsoft accounts (eg Skype, Xbox)
- For the Redirect URI select Web from the dropdown, then copy/paste the redirect url from your website setup wizard. The url will be your full domain including https: and ending in /wp-admin/
Example: https://myagencywebsite.com/wp-admin/
- Once finished, click Register. Your application will be successfully registered and you will be redirected to the Application page.
- Copy your Application (Client) ID and paste it in your website smtp setup wizard into the Client ID field.

- Next we will get our Client Secret (Value). In Azure under the Manage menu, click on Certificates & Secret, then click New Client Secret.
- A Client Secret popup will display on the right side of the screen. Enter the required details like Description (a name) and Expires (choose the longest option 24 months)
- Once done, click Add then your Client Value will be successfully generated.
- Copy the Secret Value and paste it into your website smtp setup wizard into the Client Secret (Value) field.

*Tip: This screen above displays two sets of keys: a Secret Value and a Secret ID. Copy the left Secret Value, NOT the Secret ID.
- Now you should have inside your website smtp setup wizard, all fields entered: From Email, From Name, Application (Client) ID, and Client Secret (Value)
- Click the button Connect to Office 365 to finish.

Accept and Grant permission.
- Once it says “The OAuth 2.0 authorization was successful. Ready to send email” your Microsoft 365 is connected via SMTP.
- Click Save and Continue.

- You may optionally send a test email to verify connectivity.
You have now successfully configured SMTP with Microsoft 365 for reliable email delivery from your website.