sending-emails

Integrate and troubleshoot live email sending via Mailtrap Email API and SMTP.

7|1|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/mailtrap/mailtrap-skills --skill sending-emails-mailtrap
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sending-emails
Source: https://github.com/mailtrap/mailtrap-skills/tree/main/skills/sending-emails
Command: npx skills add https://github.com/mailtrap/mailtrap-skills --skill sending-emails-mailtrap

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Help developers and integrators wire outbound mail from applications and troubleshoot live Mailtrap sending across Email API and SMTP, avoiding common mistakes like using the wrong host, stream, or token and preventing delivery failures due to missing domain verification or suppressions.

Core Features & Use Cases

  • Email API and SMTP guidance: Clear guidance on when to prefer HTTP Email API, SDKs, or SMTP and how to authenticate using API tokens.
  • Stream selection: Distinguishes Transactional, Bulk, and Batch use cases and maps each to the correct endpoints, hosts, and tokens.
  • Operational details: Rate limits, suppression handling, template usage with template_uuid and template_variables, and links to SDKs and official docs for implementation examples.
  • Use Case: Integrate a password reset flow using the transactional Email API with a maintained SDK, or send high-volume promotional mail via the bulk stream and tokens.

Quick Start

Post a single-message Email API send to the send.api.mailtrap.io endpoint with your API token in the Authorization header and a JSON body that includes from, to, subject, and text.

Frequently Asked Questions about sending-emails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send transactional email using the Mailtrap API?

To send transactional email, post a JSON body with from, to, subject, and text to the send.api.mailtrap.io endpoint, including your API token in the Authorization header. Ensure your sending domain is verified beforehand to prevent delivery failures.

When should I use the Email API instead of SMTP for sending email?

Use the Email API or maintained SDKs for faster HTTP-based sending, and use SMTP as a fallback when wiring outbound mail from legacy applications. Both require correct endpoint selection, stream-specific hosts, and API token authorization to function properly.

How do I handle bulk email sending and rate limits?

For bulk email sending, map your request to the correct bulk stream endpoints and tokens. You must handle rate limits and suppression management actively to ensure high-volume promotional mail is delivered without hitting delivery caps or suppressed addresses.

Why are my Mailtrap emails failing to send?

Emails fail due to using the wrong host, stream, or token, or because of missing domain verification and active suppressions. Verify endpoint selection, API token authorization, stream-specific hosts, and domain verification status to troubleshoot live sending failures.

Can I use email templates with variables in Mailtrap?

Yes, you can parameterize emails by including template_uuid and template_variables in your Email API JSON body. This allows you to send dynamic transactional and bulk emails while maintaining consistent formatting across your application's outbound mail.

Do I need domain verification before sending bulk email?

Yes, domain verification is required before sending bulk email to prevent delivery failures. Ensure your sending domain is fully verified, select the correct bulk stream host, and apply the proper API token to authorize high-volume outbound mail.