[WordPress] 外掛分享: Lean SMTP

首頁外掛目錄 › Lean SMTP
WordPress 外掛 Lean SMTP 的封面圖片
全新外掛
安裝啟用
尚無評分
剛更新
最後更新
問題解決
WordPress 6.0+ PHP 8.1+ v0.3.1 上架:2026-07-30

內容簡介

Lean SMTP 讓 WordPress 通過真實的郵件服務發送郵件,取代主機預設的 PHP 郵件,提升郵件送達率。此外掛設計簡潔,提供少量的傳輸選項和設定,無額外推銷。

【主要功能】
• 支援多種 SMTP 傳輸選項
• Amazon SES、Mailgun 和 Resend API 整合
• 可設定發件人名稱和地址
• 提供郵件發送失敗警報
• 測試郵件功能確認設定正確
• 可選擇記錄發送日誌

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.3.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Lean SMTP」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Lean SMTP makes WordPress send its mail through a real mail service instead of the host’s default PHP mail, which improves deliverability. It is deliberately small: a handful of transports, a handful of settings, no upsells.
Website: https://leansmtp.com
Every provider below also offers plain SMTP, so the SMTP transport alone covers all of them. The API transports exist for hosts that block outbound mail ports (25/465/587), which is common on shared hosting and some managed platforms.

SMTP — any host/port with TLS, SSL, or no encryption, optional username/password.
Amazon SES (API) — the SES v2 API, signed with a hand-rolled AWS Signature V4 signer, so no AWS SDK is bundled.
Mailgun (API) — US or EU region, sending the message as MIME so attachments and formatting survive untouched.
Resend (API) — a single API key, nothing else to configure.
Offline — record every message and send nothing, for staging sites that must never mail real customers. wp_mail() still reports success, so plugins behave exactly as they would in production.
From identity — set the From name and address, and optionally force them over anything another plugin sets.
Reply-To — a site-wide default for replies, useful when the From address is a no-reply. A Reply-To the message set itself is always kept.
wp-config.php overrides — pin any setting in code instead of the database, so credentials can live in environment variables and never diverge between environments.
Failure alerts — an admin notice when mail stops going out, so a broken mailer isn’t discovered via missed password resets. It clears itself once mail works again.
WP-CLI — wp lean-smtp test and wp lean-smtp status.
Test email — a button on the settings page to confirm your configuration works.
Send log — optional; records the most recent sends (recipient, subject, result) with a viewer and a clear button. The message headers, attachment filenames and body can each be recorded too, behind their own settings and off by default.
Encrypted secrets — stored passwords and API keys are AES-256 encrypted, keyed to your site salts.

Deliberately not included: Gmail and Microsoft 365 OAuth. Both need an OAuth consent flow, refresh-token storage, and (for Google) app verification — more machinery than the rest of this plugin combined. Use an app password or a provider above.
Configuring in wp-config.php
Any setting can be defined as a constant instead of saved in the database. The constant name is the option name in upper case, and it always wins — the settings page shows the field as read-only and names the constant, so what you see is always what is in force. Removing the constant restores whatever was saved before.
define( 'LEAN_SMTP_MAILER', 'ses' );
define( 'LEAN_SMTP_FROM_EMAIL', '[email protected]' );
define( 'LEAN_SMTP_SES_REGION', 'us-east-1' );
define( 'LEAN_SMTP_SES_ACCESS_KEY', 'AKIA…' );
define( 'LEAN_SMTP_SES_SECRET_KEY', getenv( 'SES_SECRET_KEY' ) );

Secrets defined this way are used as-is and are never written to the database. Run wp lean-smtp status to see every setting and where it came from.
External services
Lean SMTP sends email through whichever mail service you configure. When — and only when — you select an API transport and your site sends mail, the plugin connects to that provider’s HTTPS API and transmits the message being sent (recipients, subject, body, headers, and any attachments) along with the credentials you entered, so the provider can authenticate the request and deliver the message. Nothing is sent until you configure and select a transport, and the plugin contacts no other services: there is no telemetry, tracking, or analytics.
The provider you choose is the data controller for the mail you route through it. Review its terms and privacy policy:

Amazon SES — sends to email.{region}.amazonaws.com. Terms: https://aws.amazon.com/service-terms/ · Privacy: https://aws.amazon.com/privacy/
Mailgun — sends to api.mailgun.net or api.eu.mailgun.net. Terms: https://www.mailgun.com/legal/terms/ · Privacy: https://www.mailgun.com/legal/privacy-policy/
Resend — sends to api.resend.com. Terms: https://resend.com/legal/terms-of-service · Privacy: https://resend.com/legal/privacy-policy

The SMTP transport connects only to the host you configure and bundles no third-party service. The Offline mailer connects to nothing at all: messages are written to the local send log and never leave your server.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon