{"id":284340,"date":"2026-03-22T14:01:34","date_gmt":"2026-03-22T14:01:34","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/mailtrap-mailer\/"},"modified":"2026-05-08T09:47:38","modified_gmt":"2026-05-08T09:47:38","slug":"swifttrap-for-mailtrap","status":"publish","type":"plugin","link":"https:\/\/vec.wordpress.org\/plugins\/swifttrap-for-mailtrap\/","author":16869097,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.2.2","stable_tag":"2.2.2","tested":"6.9.4","requires":"6.0","requires_php":"8.0","requires_plugins":null,"header_name":"SwiftTrap for Mailtrap","header_author":"simmotorlp","header_description":"Routes wp_mail() through the Mailtrap HTTP API with configurable sender settings.","assets_banners_color":"1564c1","last_updated":"2026-05-08 09:47:38","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/plugins.symonov.com\/swifttrap-for-mailtrap\/","header_author_uri":"https:\/\/profiles.wordpress.org\/simmotorlp\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":226,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"2.2.0":{"tag":"2.2.0","author":"simmotorlp","date":"2026-03-22 14:01:06"},"2.2.2":{"tag":"2.2.2","author":"simmotorlp","date":"2026-05-08 09:47:38"}},"upgrade_notice":{"2.2.2":"<p>Plugin URI now points to the dedicated landing page on plugins.symonov.com. No code changes.<\/p>","2.2.1":"<p>Documentation-only release. Refreshed readme and confirmed compatibility with WordPress 6.9.4.<\/p>","2.2.0":"<p>WordPress Coding Standards pass \u2014 WP_Filesystem API, hardened input sanitization, and improved PHPDoc. No configuration changes required.<\/p>","2.1.0":"<p>New Stats page cards: sending domain verification and suppression list. New filters for Mailtrap template and custom-variables support.<\/p>","2.0.0":"<p>Major update: SDK removed, plugin now uses WordPress HTTP API directly. No configuration changes needed.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3488238,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3488238,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3488238,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3488238,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.2.0","2.2.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3526338,"resolution":"1","location":"assets","locale":"","width":1280,"height":639},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3526338,"resolution":"2","location":"assets","locale":"","width":1280,"height":777},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3526338,"resolution":"3","location":"assets","locale":"","width":1280,"height":509},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3526338,"resolution":"4","location":"assets","locale":"","width":948,"height":248},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3526338,"resolution":"5","location":"assets","locale":"","width":1280,"height":237}},"screenshots":{"1":"Settings page \u2014 API token, verified sender, stream routing.","2":"Stats page \u2014 sending domain verification status and suppression list (bounces, complaints, unsubscribes).","3":"Email log with retention controls.","4":"Dashboard widget showing integration status, sender, and quick links to Stats and Settings.","5":"Test email confirmation."}},"plugin_section":[262246],"plugin_tags":[206386,26736,41913,48586,41812],"plugin_category":[41],"plugin_contributors":[254989],"plugin_business_model":[],"class_list":["post-284340","plugin","type-plugin","status-publish","hentry","plugin_section-dashboard-widgets","plugin_tags-email-api","plugin_tags-email-log","plugin_tags-mailtrap","plugin_tags-transactional-email","plugin_tags-wp-mail","plugin_category-communication","plugin_contributors-simmotorlp","plugin_committers-simmotorlp"],"banners":{"banner":"https:\/\/ps.w.org\/swifttrap-for-mailtrap\/assets\/banner-772x250.png?rev=3488238","banner_2x":"https:\/\/ps.w.org\/swifttrap-for-mailtrap\/assets\/banner-1544x500.png?rev=3488238","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/swifttrap-for-mailtrap\/assets\/icon-128x128.png?rev=3488238","icon_2x":"https:\/\/ps.w.org\/swifttrap-for-mailtrap\/assets\/icon-256x256.png?rev=3488238","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/swifttrap-for-mailtrap\/assets\/screenshot-1.png?rev=3526338","caption":"Settings page \u2014 API token, verified sender, stream routing."},{"src":"https:\/\/ps.w.org\/swifttrap-for-mailtrap\/assets\/screenshot-2.png?rev=3526338","caption":"Stats page \u2014 sending domain verification status and suppression list (bounces, complaints, unsubscribes)."},{"src":"https:\/\/ps.w.org\/swifttrap-for-mailtrap\/assets\/screenshot-3.png?rev=3526338","caption":"Email log with retention controls."},{"src":"https:\/\/ps.w.org\/swifttrap-for-mailtrap\/assets\/screenshot-4.png?rev=3526338","caption":"Dashboard widget showing integration status, sender, and quick links to Stats and Settings."},{"src":"https:\/\/ps.w.org\/swifttrap-for-mailtrap\/assets\/screenshot-5.png?rev=3526338","caption":"Test email confirmation."}],"raw_content":"<!--section=description-->\n<p><strong>SwiftTrap<\/strong> is a drop-in replacement for <code>wp_mail()<\/code> that routes WordPress email through the <strong>Mailtrap Email Sending API<\/strong> instead of SMTP. It is purpose-built for Mailtrap \u2014 not a generic SMTP plugin with a Mailtrap preset \u2014 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.<\/p>\n\n<h4>Why HTTP API instead of SMTP?<\/h4>\n\n<ul>\n<li><strong>Lower latency<\/strong> \u2014 one HTTPS call per message, no MAIL FROM \/ RCPT TO \/ DATA round-trips.<\/li>\n<li><strong>Better deliverability<\/strong> \u2014 Mailtrap routes API messages through its dedicated transactional and bulk streams; SMTP doesn't expose stream selection.<\/li>\n<li><strong>Native categories<\/strong> \u2014 every email is automatically categorized (welcome, password-reset, notification, marketing, etc.) so you can filter and report on them in Mailtrap.<\/li>\n<li><strong>No firewall headaches<\/strong> \u2014 port 587\/465 blocked? API works over standard HTTPS 443.<\/li>\n<\/ul>\n\n<h4>Why SwiftTrap and not WP Mail SMTP \/ Post SMTP<\/h4>\n\n<ul>\n<li>Generic SMTP plugins use Mailtrap's SMTP credentials and lose every Mailtrap-only feature.<\/li>\n<li>SwiftTrap calls <code>send.api.mailtrap.io<\/code> for transactional mail and <code>bulk.api.mailtrap.io<\/code> for bulk mail \u2014 automatically, based on category or via filter.<\/li>\n<li>No Mailtrap PHP SDK required. Plugin is <strong>~30 KB total<\/strong> and uses only the WordPress HTTP API (<code>wp_remote_post<\/code>).<\/li>\n<li>Stats page shows your sending domain verification status and the live suppression list (bounces, complaints, unsubscribes).<\/li>\n<\/ul>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Drop-in replacement for <code>wp_mail()<\/code> \u2014 works with Contact Form 7, WooCommerce, Gravity Forms, and any plugin that uses WordPress mail.<\/li>\n<li>Automatic email categorization (welcome, password-reset, notification, marketing, etc.).<\/li>\n<li>Bulk stream routing for promotional emails; transactional stream for everything else.<\/li>\n<li>Email log with retention management \u2014 see what was sent, when, and to whom.<\/li>\n<li>Dashboard widget \u2014 at-a-glance integration status and quick links to Stats and Settings.<\/li>\n<li>Stats page: sending domain verification status + suppression list.<\/li>\n<li>Test email button on the settings page.<\/li>\n<li>Mailtrap template support via <code>template_uuid<\/code>.<\/li>\n<li>Falls back to default WordPress mail handler when disabled or token is empty.<\/li>\n<\/ul>\n\n<h4>Extensible via filters<\/h4>\n\n<ul>\n<li><code>swifttrap_mailtrap_email_category<\/code> \u2014 override the auto-detected email category.<\/li>\n<li><code>swifttrap_mailtrap_use_bulk_stream<\/code> \u2014 force a message into the bulk or transactional stream.<\/li>\n<li><code>swifttrap_mailtrap_template<\/code> \u2014 send via a Mailtrap template by <code>template_uuid<\/code>.<\/li>\n<li><code>swifttrap_mailtrap_custom_variables<\/code> \u2014 attach tracking metadata to outgoing emails.<\/li>\n<\/ul>\n\n<h4>Privacy<\/h4>\n\n<p>This plugin sends email payloads (recipients, subject, body, attachments) to the Mailtrap API at <code>send.api.mailtrap.io<\/code> and <code>bulk.api.mailtrap.io<\/code>. Account stats are fetched from <code>mailtrap.io\/api\/accounts<\/code>. See the <a href=\"https:\/\/mailtrap.io\/privacy-policy\">Mailtrap Privacy Policy<\/a>. No data is sent anywhere else.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install from <strong>Plugins \u2192 Add New<\/strong> and search for <em>SwiftTrap for Mailtrap<\/em>, or upload the <code>swifttrap-for-mailtrap<\/code> folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Go to <strong>Mailtrap \u2192 Settings<\/strong>.<\/li>\n<li>Paste your Mailtrap <strong>Send API token<\/strong> (Mailtrap dashboard \u2192 Sending Domains \u2192 API Tokens).<\/li>\n<li>Set your verified sender email and name.<\/li>\n<li>Click <strong>Send test email<\/strong> to verify delivery.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"why%20use%20swifttrap%20instead%20of%20wp%20mail%20smtp%20or%20post%20smtp%20with%20mailtrap%20credentials%3F\"><h3>Why use SwiftTrap instead of WP Mail SMTP or Post SMTP with Mailtrap credentials?<\/h3><\/dt>\n<dd><p>WP Mail SMTP and Post SMTP route through Mailtrap's SMTP gateway and treat Mailtrap as just another SMTP host. SwiftTrap uses Mailtrap's HTTP Send API, which exposes features SMTP cannot: bulk vs transactional stream routing, categories, custom tracking variables, template UUIDs, and live suppression-list visibility. Use SwiftTrap if you want Mailtrap-native behavior; use a generic SMTP plugin if you want a one-config-fits-all-providers setup.<\/p><\/dd>\n<dt id=\"does%20it%20support%20mailtrap%20email%20templates%3F\"><h3>Does it support Mailtrap email templates?<\/h3><\/dt>\n<dd><p>Yes \u2014 use the <code>swifttrap_mailtrap_template<\/code> filter to send via a <code>template_uuid<\/code>. The template variables can be passed through Mailtrap's standard template-variables payload.<\/p><\/dd>\n<dt id=\"how%20does%20bulk%20stream%20routing%20work%3F\"><h3>How does bulk stream routing work?<\/h3><\/dt>\n<dd><p>By default, marketing\/promotional categories are routed to <code>bulk.api.mailtrap.io<\/code> and everything else to <code>send.api.mailtrap.io<\/code>. Override per-message with the <code>swifttrap_mailtrap_use_bulk_stream<\/code> filter \u2014 useful for batch newsletters from a custom plugin.<\/p><\/dd>\n<dt id=\"where%20do%20i%20get%20my%20api%20token%3F\"><h3>Where do I get my API token?<\/h3><\/dt>\n<dd><p>Log in to <a href=\"https:\/\/mailtrap.io\">mailtrap.io<\/a>, open your sending domain, go to <strong>API Tokens<\/strong>, and create a token with sending permissions.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20i%20disable%20the%20plugin%20or%20remove%20the%20token%3F\"><h3>What happens if I disable the plugin or remove the token?<\/h3><\/dt>\n<dd><p>WordPress falls back to its default <code>wp_mail()<\/code> handler. No emails are silently dropped.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20require%20the%20mailtrap%20php%20sdk%3F\"><h3>Does the plugin require the Mailtrap PHP SDK?<\/h3><\/dt>\n<dd><p>No. SwiftTrap calls the Mailtrap REST API directly via the WordPress HTTP API. Total plugin size is around 30 KB.<\/p><\/dd>\n<dt id=\"what%20data%20is%20sent%20externally%3F\"><h3>What data is sent externally?<\/h3><\/dt>\n<dd><p>Email data (recipients, subject, body, attachments) goes to <code>send.api.mailtrap.io<\/code> and <code>bulk.api.mailtrap.io<\/code>. Account stats are fetched from <code>mailtrap.io\/api\/accounts<\/code>. See the <a href=\"https:\/\/mailtrap.io\/privacy-policy\">Mailtrap Privacy Policy<\/a>.<\/p><\/dd>\n<dt id=\"is%20there%20an%20attachment%20size%20limit%3F\"><h3>Is there an attachment size limit?<\/h3><\/dt>\n<dd><p>Yes \u2014 25 MB per email (matches Mailtrap's API limit).<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.2.2<\/h4>\n\n<ul>\n<li>Plugin URI: now points to the dedicated landing page at https:\/\/plugins.symonov.com\/swifttrap-for-mailtrap\/<\/li>\n<li>No code or behavior changes<\/li>\n<\/ul>\n\n<h4>2.2.1<\/h4>\n\n<ul>\n<li>Readme: USP-first rewrite emphasizing Mailtrap Email API (vs SMTP) and bulk\/transactional stream routing<\/li>\n<li>Tags: replaced <code>email<\/code>\/<code>mail<\/code>\/<code>smtp<\/code> with targeted <code>mailtrap<\/code>, <code>transactional-email<\/code>, <code>email-api<\/code>, <code>wp-mail<\/code>, <code>email-log<\/code><\/li>\n<li>FAQ: added comparison with WP Mail SMTP \/ Post SMTP, Mailtrap template support, and bulk stream routing<\/li>\n<li>Tested up to WordPress 6.9.4<\/li>\n<\/ul>\n\n<h4>2.2.0<\/h4>\n\n<ul>\n<li>Replaced all file_get_contents\/file_put_contents with WP_Filesystem API<\/li>\n<li>Fixed $_GET sanitization with proper wp_unslash() and phpcs annotations<\/li>\n<li>Improved PHPDoc headers across all files<\/li>\n<li>Better WordPress Coding Standards compliance<\/li>\n<\/ul>\n\n<h4>2.1.0<\/h4>\n\n<ul>\n<li>Added sending domain verification status on Stats page<\/li>\n<li>Added suppression list (bounces, complaints, unsubscribes) on Stats page<\/li>\n<li>Added <code>swifttrap_mailtrap_template<\/code> filter for Mailtrap template support<\/li>\n<li>Added <code>swifttrap_mailtrap_custom_variables<\/code> filter for email tracking metadata<\/li>\n<li>Extracted reusable <code>swifttrap_mailtrap_get_account_id()<\/code> with transient caching<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Removed Mailtrap SDK dependency \u2014 uses WordPress HTTP API directly<\/li>\n<li>Zero external dependencies, ~30 KB total plugin size<\/li>\n<li>Improved WP.org compliance<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Security: protected log directory from direct web access<\/li>\n<li>Added attachment size validation (25 MB limit)<\/li>\n<li>Added empty recipient validation<\/li>\n<li>Fixed timezone handling in log display<\/li>\n<li>Optimized email category computation<\/li>\n<li>Improved log file locking<\/li>\n<\/ul>","raw_excerpt":"Send WordPress emails through the Mailtrap Email API (not SMTP). Bulk and transactional streams, categories, suppression list, email log.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/284340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=284340"}],"author":[{"embeddable":true,"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/simmotorlp"}],"wp:attachment":[{"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=284340"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=284340"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=284340"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=284340"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=284340"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/vec.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=284340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}