| 开发者 | remymazmanian |
|---|---|
| 更新时间 | 2026年10月13日 22:32 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp_mail(), such as password resets, form notifications and order emails, through the Microsoft Graph sendMail endpoint with an app-only OAuth token. Messages go out from your real tenant and appear in the sender mailbox's Sent Items.
How it behaves
wp_mail_failed fires.wp_mail_content_type filter (how WooCommerce and most form plugins do it) or a Content-Type header is sent as HTML, and wp_mail_succeeded fires after each successful send, so mail logging plugins keep working.sendMail request limit. Every address in a header such as Cc: a@example.com, b@example.com is delivered, display names are kept, and an attachment keyed by name (WordPress 6.2 and newer) is sent under that name.From header set by another plugin is ignored. Set Reply-To to send replies elsewhere, such as to a contact form visitor.wp-config.php instead.sendelva folder to /wp-content/plugins/.Mail.Send, then click Grant admin consent.wp-config.php instead. The settings screen labels each value that comes from a constant.
define( 'SENDELVA_TENANT_ID', '...' );
define( 'SENDELVA_CLIENT_ID', '...' );
define( 'SENDELVA_CLIENT_SECRET', '...' );
define( 'SENDELVA_SENDER', 'noreply@example.com' );
The GRAPH_MAILER_* names from before the plugin was renamed still work.No. Sendelva talks to Microsoft Graph over HTTPS with an app-only token. There is no SMTP connection and no mailbox password.
The Microsoft Graph application permission Mail.Send, with admin consent. Without consent, Microsoft issues a token but refuses every send, which is the most common setup problem.
Mail.Send as an application permission can send as any mailbox in your tenant. To limit the app to the one mailbox you use, add an Exchange application access policy. Microsoft documents this under "Limiting application permissions to specific Exchange Online mailboxes".
With fallback on (the default), the message is handed back to WordPress's own mailer and the send log notes that it was. With fallback off, the send fails and WordPress fires wp_mail_failed.
Microsoft Graph sends as the configured sender mailbox. A From header added by another plugin can't change that. Use Reply-To to route replies somewhere else.
Yes. Anything that sends with wp_mail() goes through Sendelva, and HTML emails stay HTML.
Attachments can total up to 3 MB, the limit of Microsoft Graph's sendMail request. Larger messages fail with a clear error (and fall back to the default mailer if fallback is on).
Its settings (including the client secret, unless you use the wp-config.php constants), a cached access token, and a log of the last 20 messages with each recipient, subject and result. Uninstalling the plugin deletes all of it, on every site of a multisite network.
Sendelva is Graph Mailer under a new name. Install and activate Sendelva: the first time it runs it copies Graph Mailer's settings and send log, and GRAPH_MAILER_* constants in wp-config.php keep working. Then deactivate and delete Graph Mailer. While it's still active, Sendelva shows a link to deactivate it.
No. It makes no requests of its own except to Microsoft's sign-in and Graph services, and only once it's configured. See "External services" below.
sendelva, and its settings screen is under Settings > Sendelva.GRAPH_MAILER_* constants in wp-config.php keep working. The new names are SENDELVA_*.wp_mail_content_type filter, which arrived as raw markup.wp_mail_succeeded after a successful send, attachment names from array keys, and multisite-aware uninstall.