[WordPress] 外掛分享: API Mailer for AWS SES

首頁外掛目錄 › API Mailer for AWS SES
全新外掛
安裝啟用
★★★★★
5/5 分(1 則評價)
48 天前
最後更新
問題解決
WordPress 5.6+ PHP 7.4+ v1.4 上架:2025-12-28

內容簡介

以下是對於「API Mailer for AWS SES」這個WordPress外掛的總結:
- 這個外掛使用直接的Amazon SES API整合替代了wp_mail(),消除了SMTP層或PHPMailer在關鍵路徑中的過多開銷,提高了可靠性。
- 外掛著重在正確性、效能和操作明確性。

請看以下提供的問題與答案:
<ol>
<li>API Mailer for AWS SES這個外掛的主要特點有哪些?</li>
答:主要特點包括:
<ul>
<li>直接SES API (SendRawEmail)整合 — 無需SMTP。</li>
<li>具有Action Scheduler或wp_cron回退的後台發送隊列。</li>
<li>使用作業ID進行細小參數排隊,以保持cron載荷的小型和私密。</li>
<li>可配置的每秒速率限制,以保持在SES發送速率之下。</li>
<li>From/Reply-To處理,包括可選強制From和定製X-*標頭。</li>
<li>測試標籤可發送測試電子郵件,狀態標籤可獲取SES GetSendQuota。</li>
<li>具有成功/失敗條目和可選生產禁用的日誌查看器。</li>
<li>可從性wp-config(常數)或保存設置設定憑據。</li>
<li>輕量級,最小I/O,無Composer依賴。</li>
<li>在刪除時切換卸載清理以刪除設置和日誌。</li>
</ul>
<li>這個外掛為何高效?</li>
答:它避免使用SMTP/PHPMailer進行發送,直接使用緊湊的MIME和SES API。在啟用時,後台隊列會立即將控制權返回給請求。作業有效載荷存儲在服務器端,並通過小作業ID引用,以避免大型序列化cron參數。日誌記錄是可選的並自動修剪以保持低I/O。</li>
<li>如何在wp-config中配置憑據?</li>
答:您可以在wp-config.php中定義以下常數,然後在外掛設置中啟用“從wp-config讀取AWS憑證”。
<ul>
<li>define('SES_MAILER_ACCESS_KEY','YOUR_ACCESS_KEY_ID');</li>
<li>define('SES_MAILER_SECRET_KEY','YOUR_SECRET_ACCESS_KEY');</li>
<li>define('SES_MAILER_REGION','us-east-1');</li>
</ul>
啟用此模式時,存取密鑰,密鑰和地區欄位將被清除,禁用並被忽略。</li>
</ol>

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.4) 或搜尋安裝

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

原文外掛簡介

API Mailer for AWS SES replaces wp_mail() with a direct Amazon SES API integration (SendRawEmail). There is no SMTP layer or PHPMailer handoff in the critical path, reducing overhead and improving reliability.
The plugin focuses on correctness, performance, and operational clarity:
– Direct AWS SigV4 signed requests to SES
– Minimal overhead in the wp_mail() hook
– Optional background queue with Action Scheduler or wp_cron fallback
– Optional logging via WooCommerce logger or PHP error_log
– Clean, PSR-4 structured codebase
Key Features

Direct SES API (SendRawEmail) integration — no SMTP required.
Background sending queue with Action Scheduler or wp_cron fallback.
Tiny-args queueing with job IDs to keep cron payloads small and private.
Configurable rate limiting per second to stay under SES send rate.
From/Reply-To handling with optional forced From and custom X-* headers.
Test tab to send a test email and a Status tab to fetch SES GetSendQuota.
Logging via WooCommerce logger or PHP error_log, disabled by default.
Credentials from wp-config (constants) or saved settings.
Lightweight, minimal I/O, no Composer dependency.
Uninstall cleanup toggle to remove settings and queued jobs on deletion.

Why It’s High Performance

Avoids SMTP for the send path; uses PHPMailer only for MIME construction, then sends via SES API directly.
Background queue returns control to the request immediately when enabled.
Job payloads are stored server-side and referenced by a small job_id to avoid large serialized cron arguments.
Logging is optional and disabled by default to keep I/O low.

Configuration
Credentials in wp-config (recommended)
Define the following constants above “That’s all, stop editing!” in wp-config.php, then enable “Read AWS credentials from wp-config” in the plugin settings.
define('SES_MAILER_ACCESS_KEY', 'YOUR_ACCESS_KEY_ID');
define('SES_MAILER_SECRET_KEY', 'YOUR_SECRET_ACCESS_KEY');
define('SES_MAILER_REGION', 'us-east-1');

When this mode is enabled, the Access Key, Secret, and Region fields are cleared, disabled, and ignored.
Background Sending

When enabled, emails are queued and sent out of band by Action Scheduler if available, or by wp_cron as a fallback.
The plugin stores the full email payload in an option keyed by ses_mailer_job_{uuid} (autoload = no) and schedules a tiny cron/action with only job_id.
Retries: up to 3 total attempts with exponential backoff (60s, then 120s).
For consistent cron execution on low-traffic sites, configure a real system cron to call wp-cron.php regularly.

Rate Limiting

A per-email pause is applied based on the configured send rate to avoid exceeding SES limits.

Logging

When enabled, log entries route to WooCommerce Status → Logs (source: api-mailer-for-aws-ses) if WooCommerce is active, or to the PHP error log otherwise.
Logging is disabled by default. Uncheck “Disable logging” in settings to enable.

External Services

This plugin connects to Amazon Simple Email Service (AWS SES) at https://email.{region}.amazonaws.com to send email and to fetch sending quotas.
Data sent on each email: recipients, subject, message body, headers, attachments, and your AWS access key ID (signed via AWS SigV4); required to deliver the email.
Data sent when checking quotas: your AWS access key ID and a signed request; no recipient data is sent.
Service terms: https://aws.amazon.com/service-terms/ — Privacy: https://aws.amazon.com/privacy/

Translations

Text domain: api-mailer-for-aws-ses
Translation template: languages/api-mailer-for-aws-ses.pot
Example: Danish languages/api-mailer-for-aws-ses-da_DK.po (compile to .mo for runtime)

About the Author
API Mailer for AWS SES is built and maintained by beltoft.net.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon