Single
1 Site
1 site
Choose planWordPress plugin
Send mail from WordPress through your Microsoft 365 mail account or Personal Microsoft account (hotmail.com, outlook.com)
Upgrade
1 Site
1 site
Choose plan5 Sites
5 sites
Choose planUnlimited sites
Unlimited sites
Choose planWP Graph Mail lets WordPress send email securely through a Microsoft 365 mailbox using Microsoft Graph.
Instead of relying on the web server's local mail function or traditional SMTP authentication, WP Graph Mail connects WordPress directly to Microsoft 365. Emails generated by WordPress — including contact forms, password resets, WooCommerce notifications and other wp_mail() messages — can therefore be sent through your Microsoft 365 account.
The plugin is designed for websites and organizations already using Microsoft 365 and Exchange Online and provides a modern alternative to configuring an external SMTP service.
Once configured with your Microsoft Entra application and Microsoft 365 mailbox, WP Graph Mail automatically handles mail sent through WordPress. Existing plugins that use the standard WordPress wp_mail() function normally require no additional configuration.
Key features include:
Send WordPress email through Microsoft 365
Uses the Microsoft Graph API
Works with standard WordPress wp_mail() messages
Compatible with contact forms, WooCommerce and other WordPress plugins
No traditional SMTP username/password authentication
Uses Microsoft Entra ID for authorization
Configurable sender mailbox
Built-in connection and mail testing
Designed specifically for Microsoft 365 / Exchange Online
Simple WordPress administration interface
WP Graph Mail is intended to do one job: reliably send WordPress mail through your Microsoft 365 environment without requiring a separate transactional email provider.
WP Graph Mail sends WordPress email through a Microsoft 365 mailbox using Microsoft Graph.
Before installing WP Graph Mail, create an application in Microsoft Entra ID that allows WordPress to send mail through Microsoft Graph.
Go to azure.com and sign in with an account that has sufficient administrative permissions for your Microsoft 365 tenant.
After signing in, click the search field at the top.
Search for Tenant ID and select Microsoft Entra ID.
Locate Tenant ID and copy the value. You will need it when configuring WP Graph Mail.
It looks similar to:
`a1b2cdef-345a-6b78-cdef-901234567a89`
Open App registrations.
Click + New registration.
Enter a recognizable name, for example:
WP Graph Mail
Under Supported account types, select:
Accounts in this organizational directory only (Single tenant)
Under Redirect URI, select Web, but leave the URI field empty.
Click Register.
After registration, the application's overview page opens.
Copy the value shown as Application (client) ID.
It looks similar to:
`12abc45e-12ab-34cd-56ef-abcd1234ef56`
Do not confuse it with Object ID or the other identifiers shown on the page.
In the menu on the left, expand Manage and select Certificates & secrets.
Click + New client secret.
Enter a description, for example:
WP Graph Mail
Choose an expiration period. If 730 days / 24 months is available, select it.
Click Add.
Immediately copy the newly created secret's Value.
Do not copy the Secret ID.
The complete secret value is normally shown only when the secret is created. If you leave or reload the page, you may no longer be able to retrieve it.
You should now have:
Select API permissions from the menu on the left.
Click + Add a permission.
Select Microsoft Graph.
Select Application permissions.
Do not select Delegated permissions.
Search for:
Mail.Send
Expand Mail and select:
Mail.Send — Send mail as any user
Click Add permissions.
After adding the permission, return to the API permissions page.
Select the Mail.Send permission and click:
Grant admin consent for <your organization>
Confirm the request.
The Microsoft 365 preparation is now complete.
Download WP Graph Mail from the plugin page in Computernørden's Plugin Directory.
Sign in to your WordPress administration area.
Go to:
Plugins → Add Plugin
[[22 - Go to Plugins.png]]
Click Upload Plugin.
[[23 - Upload Plugin.png]]
Click Choose File.
[[24 - Choose a file.png]]
Select the WP Graph Mail ZIP file you downloaded.
Click Install Now.
[[25 - Install now.png]]
When installation has completed, click Activate Plugin.
[[26 - Activate Plugin.png]]
In WordPress, go to:
Settings → WP Graph Mail
[[27 - Initial setup of the plugin.png]]
Enter the values you saved during the Microsoft 365 preparation:
Enter the email address of a valid Microsoft 365 mailbox in your tenant.
Enable:
Send wp_mail() through Microsoft Graph
[[28 - ENter the values.png]]
Click Save Changes.
WP Graph Mail will now route WordPress email sent through `wp_mail()` through your Microsoft 365 mailbox using Microsoft Graph.
[[29 - the mail is sent!.png]]
Keep your Client Secret confidential. Treat it like a password.
If the Client Secret expires, WP Graph Mail will no longer be able to send mail until you create a new secret in Microsoft Entra ID and update the plugin settings.