[WordPress] 外掛分享: SwiftTrap for Mailtrap

首頁外掛目錄 › SwiftTrap for Mailtrap
WordPress 外掛 SwiftTrap for Mailtrap 的封面圖片
全新外掛
安裝啟用
尚無評分
8 天前
最後更新
問題解決
WordPress 6.0+ PHP 8.0+ v3.0.0 上架:2026-03-21

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.0.0) 或搜尋安裝

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

原文外掛簡介

SwiftTrap is a drop-in replacement for wp_mail() that routes WordPress email through the Mailtrap Email Sending API instead of SMTP. It is purpose-built for Mailtrap — not a generic SMTP plugin with a Mailtrap preset — so it exposes Mailtrap-native features that SMTP cannot: bulk vs transactional stream routing, email categories, custom variables for tracking, suppression lists, and domain verification status.
Why HTTP API instead of SMTP?

Lower latency — one HTTPS call per message, no MAIL FROM / RCPT TO / DATA round-trips.
Better deliverability — Mailtrap routes API messages through its dedicated transactional and bulk streams; SMTP doesn’t expose stream selection.
Native categories — every email is automatically categorized (welcome, password-reset, notification, marketing, etc.) so you can filter and report on them in Mailtrap.
No firewall headaches — port 587/465 blocked? API works over standard HTTPS 443.

Why SwiftTrap and not WP Mail SMTP / Post SMTP

Generic SMTP plugins use Mailtrap’s SMTP credentials and lose every Mailtrap-only feature.
SwiftTrap calls send.api.mailtrap.io for transactional mail and bulk.api.mailtrap.io for bulk mail — automatically, based on category or via filter.
No Mailtrap PHP SDK required. Plugin is ~30 KB total and uses only the WordPress HTTP API (wp_remote_post).
Stats page shows your sending domain verification status and the live suppression list (bounces, complaints, unsubscribes).

Features

Drop-in replacement for wp_mail() — works with WooCommerce, Contact Form 7, Gravity Forms, and any plugin that uses WordPress mail.
Automatic email categorization and stream routing overrides via settings grid.
Delivery Tracking & Webhooks — Real-time event tracking via custom REST route swifttrap/v1/webhook.
Suppression Management — CRUD panel for Mailtrap suppression lists with pre-send recipient suppression checks.
Reliability Fallback — Graceful failover back to WordPress native wp_mail() if the Mailtrap API call fails.
Site Health integration — Verification test checking Mailtrap token status and sending domain verification.
Live Email Log — Browse and filter delivery data pulled directly from the Mailtrap API; search by recipient address, status, or date range with automatic pagination.
WP-CLI commands — Command-line management via wp swifttrap (test, stats, prune-logs, send-suppression-sync).
Attachment size guard — Configurable limits to prevent oversized files from rejecting at the API gateway.
Test email button on the settings page.
Mailtrap template support via template_uuid.
Falls back to default WordPress mail handler when disabled or token is empty.

Extensible via filters

swifttrap_mailtrap_email_category — override the auto-detected email category.
swifttrap_mailtrap_use_bulk_stream — force a message into the bulk or transactional stream.
swifttrap_mailtrap_template — send via a Mailtrap template by template_uuid.
swifttrap_mailtrap_custom_variables — attach tracking metadata to outgoing emails.

Privacy
This plugin sends email payloads (recipients, subject, body, attachments) to the Mailtrap API at send.api.mailtrap.io and bulk.api.mailtrap.io. Account stats and email logs are fetched from mailtrap.io/api/accounts and mailtrap.io/api/email_logs. See the Mailtrap Privacy Policy. No data is sent anywhere else.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon