{"id":3753,"date":"2026-04-27T11:31:45","date_gmt":"2026-04-27T09:31:45","guid":{"rendered":"https:\/\/skaar.media\/uncategorized\/instructions-setting-up-an-email-provider-for-wordpress-smtp\/"},"modified":"2026-04-27T11:31:53","modified_gmt":"2026-04-27T09:31:53","slug":"instructions-setting-up-an-email-provider-for-wordpress-smtp","status":"publish","type":"post","link":"https:\/\/skaar.media\/en\/guides\/instructions-setting-up-an-email-provider-for-wordpress-smtp\/","title":{"rendered":"Instructions: Setting up an email provider for WordPress\/SMTP"},"content":{"rendered":"\n<p>This guide shows you how to set up a secure and stable connection between your website and Microsoft 365 (Outlook) for sending emails from WordPress. The method applies regardless of which SMTP plugin you use &#8211; for example <strong>FluentSMTP<\/strong>, <strong>WP Mail SMTP<\/strong>, <strong>Post SMTP<\/strong>, or others. <\/p>\n\n<p><strong>Objective:<\/strong> Configure the site so that all outgoing emails are sent via the chosen email provider (SMTP or API) instead of the default PHP mail(), for better delivery rates and fewer spam issues.<\/p>\n\n<p><\/p>\n\n<h3 class=\"wp-block-heading\">1. Preparations<\/h3>\n\n<p>Before you start you must have:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Administrator access to the WordPress website.<\/li>\n\n\n\n<li>An active <strong>Microsoft 365 account<\/strong> (business or personal).<\/li>\n\n\n\n<li>Access to <strong>Azure Portal<\/strong> to create app registration.<\/li>\n\n\n\n<li>A selected SMTP plugin installed and activated in WordPress.<\/li>\n<\/ul>\n\n<p><strong>Tip:<\/strong> Keep your browser open in two tabs &#8211; one for the WordPress plugin and one for Azure Portal.<\/p>\n\n<p><\/p>\n\n<h3 class=\"wp-block-heading\">2. Create a new app registration in Azure<\/h3>\n\n<ol class=\"wp-block-list\">\n<li>Go to <a href=\"https:\/\/portal.azure.com\" target=\"_blank\" rel=\"noopener\">https:\/\/portal.azure.com.<\/a><br\/><br\/><img decoding=\"async\" src=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-dashboard-1536x585-1-1024x390.png\" alt=\"\" title=\"\"><br\/><br\/><\/li>\n\n\n\n<li>Select <strong>Azure Active Directory<\/strong> \u2192 <strong>App registrations<\/strong> \u2192 <strong>New registration<\/strong>.<br\/><img decoding=\"async\" src=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-app-registration-search-1536x697-1-1024x465.png\" alt=\"\" title=\"\"><br\/><br\/><img decoding=\"async\" src=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-app-registration-add-1536x464-1-1024x309.png\" alt=\"\" title=\"\"><br\/><br\/><\/li>\n\n\n\n<li>Give the app a name, e.g. <code>WordPress SMTP<\/code>.<br\/><br\/><img decoding=\"async\" src=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/9-1024x316.png\" alt=\"\" title=\"\"><br\/><\/li>\n\n\n\n<li>Under <strong>Supported account types<\/strong>, select:<br\/>\u27a4 <em>Accounts in any organizational directory and personal Microsoft accounts.<\/em><\/li>\n\n\n\n<li>Under <strong>Redirect URI (optional)<\/strong>, select <em>Web<\/em> and enter:<br\/><br\/><code>https:\/\/example.com\/wp-admin\/options-general.php?page=wp-mail-smtp<\/code><br\/><em>(Replace <code>example.com<\/code> with your own domain name)<\/em><br\/><br\/><img decoding=\"async\" src=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/11-1024x313.png\" alt=\"\" title=\"\"><br\/><br\/><\/li>\n\n\n\n<li>Click <strong>Register<\/strong>.<\/li>\n<\/ol>\n\n<h3 class=\"wp-block-heading\">3. Create client ID and secret<\/h3>\n\n<p>After the app has been created, copy the following:<\/p>\n\n<ul class=\"wp-block-list\">\n<li><strong>Application (client) ID<\/strong><\/li>\n\n\n\n<li><strong>Directory (tenant) ID<\/strong><br\/><br\/><img decoding=\"async\" src=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-app-app-ID-1536x436-1-1024x291.png\" alt=\"\" title=\"\"><br\/><\/li>\n<\/ul>\n\n<p>Go to the menu <strong>Certificates &amp; secrets<\/strong> \u2192 <strong>New client secret<\/strong>.<br\/><\/p>\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"557\" src=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-app-secret-add-1536x836-1-1024x557.png\" alt=\"\" class=\"wp-image-3722\" title=\"\" srcset=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-app-secret-add-1536x836-1-1024x557.png 1024w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-app-secret-add-1536x836-1-750x408.png 750w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-app-secret-add-1536x836-1-768x418.png 768w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-app-secret-add-1536x836-1-500x272.png 500w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-app-secret-add-1536x836-1.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n<p>Give it a name (e.g. <code>SMTP integration<\/code>) and select the expiration time.<\/p>\n\n<p>Click <strong>Add<\/strong> and copy the generated secret value.<br\/>\u26a0\ufe0f It only appears once &#8211; copy it before you navigate away!<\/p>\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"429\" src=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-client-secret-1536x643-1-1024x429.png\" alt=\"\" class=\"wp-image-3724\" title=\"\" srcset=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-client-secret-1536x643-1-1024x429.png 1024w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-client-secret-1536x643-1-750x314.png 750w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-client-secret-1536x643-1-768x322.png 768w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-client-secret-1536x643-1-500x209.png 500w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/azure-client-secret-1536x643-1.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n<h3 class=\"wp-block-heading\">4. Add API permissions<\/h3>\n\n<p>In the app, go to <strong>API Permissions<\/strong> \u2192 <strong>Add a permission<\/strong>.<\/p>\n\n<p>Select <strong>Microsoft Graph<\/strong> \u2192 <strong>Delegated permissions<\/strong>.<\/p>\n\n<p>Search for and add these permissions:<\/p>\n\n<ul class=\"wp-block-list\">\n<li><code>Mail.Send<\/code><\/li>\n\n\n\n<li><code>offline_access<\/code><\/li>\n\n\n\n<li><code>openid<\/code><\/li>\n\n\n\n<li><code>SMTP.Send<\/code> <em>(if available)<\/em><\/li>\n<\/ul>\n\n<p>Click <strong>Add permissions<\/strong>.<\/p>\n\n<p>Click <strong>Grant admin consent<\/strong> to activate the permissions.<br\/><\/p>\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"899\" src=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/screencapture-testwp-ibrahimsharif-wp-admin-options-general-php-2023-01-24-18_06_12-1536x1349-1-1024x899.png\" alt=\"\" class=\"wp-image-3726\" title=\"\" srcset=\"https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/screencapture-testwp-ibrahimsharif-wp-admin-options-general-php-2023-01-24-18_06_12-1536x1349-1-1024x899.png 1024w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/screencapture-testwp-ibrahimsharif-wp-admin-options-general-php-2023-01-24-18_06_12-1536x1349-1-750x659.png 750w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/screencapture-testwp-ibrahimsharif-wp-admin-options-general-php-2023-01-24-18_06_12-1536x1349-1-768x675.png 768w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/screencapture-testwp-ibrahimsharif-wp-admin-options-general-php-2023-01-24-18_06_12-1536x1349-1-500x439.png 500w, https:\/\/skaar.media\/wp-content\/uploads\/2025\/11\/screencapture-testwp-ibrahimsharif-wp-admin-options-general-php-2023-01-24-18_06_12-1536x1349-1.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n<p><\/p>\n\n<h3 class=\"wp-block-heading\">5. Add the Redirect URI (if not done previously) under <strong>Authentication<\/strong> in the Azure app:<\/h3>\n\n<ul class=\"wp-block-list\">\n<li>Click <strong>Add a platform<\/strong> \u2192 <strong>Web<\/strong>.<\/li>\n\n\n\n<li>Add the same Redirect URI that the plugin displays.<\/li>\n\n\n\n<li>For example:  <code>https:\/\/dittdomene.no\/wp-admin\/options-general.php?page=fluent-smtp<\/code><\/li>\n\n\n\n<li>Activate &#8220;Access tokens&#8221; and &#8220;ID tokens&#8221;.<\/li>\n<\/ul>\n\n<p>Click <strong>Save<\/strong>.<\/p>\n\n<h3 class=\"wp-block-heading\">6. Set up the connection in WordPress<\/h3>\n\n<ul class=\"wp-block-list\">\n<li>Go to WordPress dashboard \u2192 <em>Settings &gt; SMTP plugin name &gt; Settings<\/em>.<\/li>\n\n\n\n<li>Select <strong>Microsoft 365\/Outlook<\/strong> as your provider.<\/li>\n\n\n\n<li>Paste:<\/li>\n\n\n\n<li><strong>Tenant ID<\/strong><\/li>\n\n\n\n<li><strong>Customer ID<\/strong><\/li>\n\n\n\n<li><strong>Customer Secret<\/strong><\/li>\n\n\n\n<li><strong>Redirect URI<\/strong> (same as in Azure)<\/li>\n\n\n\n<li>Click <strong>Save settings<\/strong> and then <strong>Authenticate<\/strong> or <em>Connect to Microsoft<\/em>.<\/li>\n\n\n\n<li>Log in with your Microsoft account and authorize access.<\/li>\n<\/ul>\n\n<h3 class=\"wp-block-heading\">7. Test that email works<\/h3>\n\n<ul class=\"wp-block-list\">\n<li>Go to <strong>Send test email<\/strong> in the plugin.<\/li>\n\n\n\n<li>Send a test to an address you control.<\/li>\n\n\n\n<li>Check that the email arrives without errors or spam tags.<\/li>\n\n\n\n<li>If you get an error message, check:<\/li>\n\n\n\n<li>That all IDs and secrets are correct.<\/li>\n\n\n\n<li>That the API permissions are approved.<\/li>\n\n\n\n<li>That you use the correct redirect URI and account.<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\">8. Troubleshooting and maintenance<\/h2>\n\n<ul class=\"wp-block-list\">\n<li>The token given during authentication may expire after 6-12 months.<br\/>If email suddenly stops working, log in again via the plugin.<\/li>\n\n\n\n<li>Don&#8217;t delete the secret in Azure until you&#8217;ve added a new one.<\/li>\n\n\n\n<li>Update WordPress and the SMTP plugin regularly.<\/li>\n\n\n\n<li>Ensure the correct <strong>SPF<\/strong>, <strong>DKIM<\/strong> and <strong>DMARC setup<\/strong> in DNS for the domain.<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\">In summary<\/h2>\n\n<p>You have now created a secure link between Microsoft 365 and WordPress for sending emails.<br\/>This setup works with all modern SMTP plugins, and provides:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Better delivery rate<\/li>\n\n\n\n<li>Less chance of emails ending up in spam<\/li>\n\n\n\n<li>More secure authentication via Microsoft Graph \/ OAuth 2.0<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This guide shows you how to set up a secure and stable connection between your website and Microsoft 365 (Outlook) for sending emails from WordPress. The method applies regardless of which SMTP plugin you use &#8211; for example FluentSMTP, WP Mail SMTP, Post SMTP, or others. Objective: Configure the site so that all outgoing emails [&#8230;]\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[104,106],"tags":[],"class_list":["post-3753","post","type-post","status-publish","format-standard","hentry","category-guides","category-wordpress"],"_links":{"self":[{"href":"https:\/\/skaar.media\/en\/wp-json\/wp\/v2\/posts\/3753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skaar.media\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skaar.media\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skaar.media\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skaar.media\/en\/wp-json\/wp\/v2\/comments?post=3753"}],"version-history":[{"count":1,"href":"https:\/\/skaar.media\/en\/wp-json\/wp\/v2\/posts\/3753\/revisions"}],"predecessor-version":[{"id":3754,"href":"https:\/\/skaar.media\/en\/wp-json\/wp\/v2\/posts\/3753\/revisions\/3754"}],"wp:attachment":[{"href":"https:\/\/skaar.media\/en\/wp-json\/wp\/v2\/media?parent=3753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skaar.media\/en\/wp-json\/wp\/v2\/categories?post=3753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skaar.media\/en\/wp-json\/wp\/v2\/tags?post=3753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}