Herewith a guide to connecting WordPress email via Office 365 through an app registration in Azure i..c.w. the WordPress plugin Fluent SMTP. Much of the manual works the same with the plugin WP Mail SMTP Pro. With WP Mail SMTP, you need the Pro version to make this connection.
The app registration connector is the successor to the default connector that can be set up in Office 365.
1. Download and install Fluent SMTP
2. Go to settings/setting from Fluent SMTP
3. When importing old data, select "Skip”
4. Choose from the services for Microsoft
5. At from e-mail choose the e-mail address, e.g. info@milcraftappvoorbeeld.nl
6. Under from name, choose the name the recipient should see when a new mail is sent, e.g. "Tom van Miltenburg | Milcraft”
7. Copy the callback at "App callback URL (Use this URL for your APP)“.
For the website https://www.milcraftappvoorbeeld.nl is this https://www.milcraftappvoorbeeld.nl/wp-json/fluent-smtp/outlook_callback
8. Now we make the Application client ID and the Application client secret.
Open in a new tab naat https://portal.azure.com. Log in here using your office login details, so in this example info@milcraftappvoorbeeld.nl with mailbox password.
9. In the search bar, type "App registrations”
10. At the top left, press "New registration”
11. Under name, enter a display name. Only you-you see this in Azure.
12. Choose "Accounts in each organisational directory (each Microsoft Entra ID tenant: multiple tenants) and personal Microsoft accounts (e.g. Skype, Xbox)”
13. At "Diversion-URI (optional)" for "Web" and place the previously copied callback url from step 7 here.
14. Press "Register“.
15. Copy the string behind "Application ID (client ID)" and matches it to Fluent SMTP in the field "Application client ID”
16. Go to the Azure tab again and open the "Certificates and secrets" and press "+New client secret“.
17. Under description, enter your own description. Only you will see this.
18. Choose a period. Bear in mind that you will have to create a new one after that period and put it in your diary in advance. This is because it won't work after that.
19. Copy the string under "Value" and matched it in Fluent SMTP at "Application client secret" and press the button "Authenticate & get access token”
20. A Access Code generated. Copy the entire code and paste it into Fluent SMTP under "Access code“.
21. Press "Save connection settings”
22. In Fluent SMTP, go to the tab "E-mail test" and send a test mail. We use mail-tester.com
Customer of Milcraft (or become :)) and need help setting up? Let us know!