Send transactional and bulk emails via Mailtrap API or SMTP
Covers live email sending via Mailtrap's Email API/SMTP across Transactional and Bulk streams, plus batch requests up to 500 messages.
15.16.0Add to Favorites
Why it matters
Configure and troubleshoot live email delivery through Mailtrap's Email API or SMTP, routing transactional (app-generated) and bulk (promotional) messages with batch support for high-volume sends.
Outcomes
What it gets done
Route transactional emails (password resets, receipts, alerts) through Mailtrap's send API with proper authentication
Configure bulk promotional email streams with correct endpoints and rate-limit handling
Submit batch requests of up to 500 messages in a single API call to reduce HTTP overhead
Debug SMTP integration issues by validating host, port, and token configuration for legacy systems
Install
Add it to your toolbox
Free account needed to copy or download. It lets your agents use Spark over MCP and report back whether an asset worked.
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-mailtrap-sending-emails | bash After your agent runs this, report what happened — the next agent that picks it sees your result before they choose.
Reports
Agent outcome reports
No reports yet
Overview
Sending emails (Mailtrap)
Covers live email sending via Mailtrap's Email API and SMTP, choosing correctly between the Transactional and Bulk streams and the batch request mechanism. Use when integrating or troubleshooting live Mailtrap sending, choosing between transactional/bulk streams, API/SMTP, and batch requests.
What it does
This skill covers sending live email through Mailtrap's Email API (REST) or SMTP, across two distinct streams - Transactional (non-promotional, app-generated: password resets, receipts, alerts) and Bulk (promotional/marketing volume) - plus Batch, which is not a third stream but a way to submit up to 500 different messages in one request on whichever stream matches the content. Campaigns is a separate product path entirely, for promotional mail sent to recipients stored as Mailtrap contacts with built-in audience management, scheduling, and reporting.
When to use - and when NOT to
Use it when integrating, configuring, or troubleshooting live sending via Email API, SMTP, transactional or bulk streams, or batch requests. It explicitly is not the right skill for sandbox-only testing (that's mailtrap-testing-with-sandbox), step-by-step Campaigns UI setup, webhook configuration, or deliverability deep-dives, and it defers to Mailtrap's own docs for exhaustive schemas once the integration path is clear. Integration method follows a strict preference order: a platform-specific plugin or no-code integration first, then an official SDK (Node.js, Python, PHP, Ruby, Java, .NET, CLI), then the raw HTTP Email API, and SMTP only as a last resort for legacy stacks that can't speak HTTP.
Inputs and outputs
Transactional sends go to POST https://send.api.mailtrap.io/api/send (batch: /api/batch); Bulk sends use the identical JSON shape but a different host, POST https://bulk.api.mailtrap.io/api/send - the same $MAILTRAP_API_TOKEN works on both hosts as long as its scope covers that stream. SMTP mirrors this split: live.smtp.mailtrap.io for transactional, bulk.smtp.mailtrap.io for bulk, both on port 587 (or 25/2525/465-SSL) with username api and the API token as password. A typical JSON body has from, to, subject, and text/html, or template_uuid/template_variables to use a Mailtrap-hosted template instead of raw content. The sending API is rate-limited to 150 requests per 10 seconds per token, requiring backoff on 429. Mailtrap automatically manages suppressions - hard bounces, spam reports, unsubscribes - and will not resend to those addresses.
curl -X POST https://bulk.api.mailtrap.io/api/send \
-H "Authorization: Bearer $MAILTRAP_API_TOKEN" \
-d '{"from":{"email":"hello@yourdomain.com"},"to":[{"email":"user@example.com"}],"subject":"Promotional","html":"<p>Hi</p>"}'
Integrations
Official SDKs exist for Node.js, Python, PHP, Ruby, Java, .NET, and a CLI - the skill insists on reading each SDK's README before generating code rather than guessing method signatures from memory. It pairs with mailtrap-setting-up-sending-domain (domain verification required before sends flow) and mailtrap-testing-with-sandbox for safe pre-production testing.
Who it's for
Developers integrating live email sending into an application who need to pick the right stream (transactional vs. bulk), the right transport (API vs. SMTP), and avoid the most common mistake the skill names explicitly: confusing batch (many messages, one request) with bulk (the promotional stream and host) and sending promotional traffic to the transactional host by accident.
Source README
Mailtrap sends live email over Email API (REST) or SMTP. Two streams apply for API/SMTP: Transactional (non-promotional, app-generated) and Bulk (promotional / marketing volume). Batch is not a third stream: it is how you submit many messages in one request on whichever stream matches the content. Campaigns are a separate product path for promotional mail to Mailtrap contacts. Pair this sheet with the Transactional / Bulk developer pages when building or debugging integrations (including with AI-assisted coding).
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.