Notes · Guide · LLM and WordPress, 2 of 4

Send WordPress email through Microsoft 365

Step-by-step: register an Entra app, grant Mail.Send with admin consent, configure Sendelva, and send WordPress mail with no SMTP credentials.

2 min read Updated Oct 18, 2026 Microsoft 365 WordPress

If your email lives in Microsoft 365, your WordPress server does not need SMTP credentials. The free Sendelva plugin (formerly Graph Mailer) sends all WordPress email through Microsoft Graph with an app-only token. This guide walks the full setup. Budget fifteen minutes, and you need admin rights in your Microsoft tenant once.

1. Register an application in Entra

Sign in to the Microsoft Entra admin center with an admin account and open App registrations. Click “New registration”. Name it something like “WordPress Mailer”, keep “Single tenant” selected, leave the redirect URI empty, and register. On the Overview page, copy the Directory (tenant) ID and the Application (client) ID somewhere handy.

2. Create a client secret

In the app, open Certificates & secrets and click “New client secret”. Pick an expiry and copy the Value column immediately. It is shown once. Put the expiry date in your calendar now, because mail stops when the secret lapses.

Open API permissions → “Add a permission” → Microsoft Graph → Application permissions. Not Delegated. Tick Mail.Send, add it, then click “Grant admin consent” and confirm.

This is the step everyone misses. Without consent, the token is issued and every send is refused, which looks like a broken plugin instead of a missing checkbox.

4. Configure the plugin

Install Sendelva from GitHub and open Settings → Sendelva. Enter the tenant ID, client ID, secret, and the sender mailbox. The sender must be a real licensed or shared mailbox in your tenant. Leave “Fall back to the default mailer” on. Until all four values are present the plugin is inert and mail flows exactly as before.

For production, keep the secret out of the database with wp-config constants:

define( 'SENDELVA_TENANT_ID', '...' );
define( 'SENDELVA_CLIENT_ID', '...' );
define( 'SENDELVA_CLIENT_SECRET', '...' );
define( 'SENDELVA_SENDER', '[email protected]' );

5. Send a test

Use the Test card on the settings screen. The send log below it records every attempt, success or failure, with the exact Graph error when something is off. If the test fails with a permissions error, go back to step 3.

6. Optional: limit the blast radius

Application Mail.Send can send as any mailbox in the tenant. An Exchange application access policy restricts the app to the one sender you intend. Not required to function. Recommended for production, because it caps what a leaked secret can do.