MCP HubMCP Hub
SKILL·2A993F

sending-emails

mailtrap
Actualizado 28 days ago
5 vistas
9
1
9
Ver en GitHub
Desarrolloaiapi

Acerca de

Esta habilidad ayuda a los desarrolladores a integrar, configurar y solucionar problemas de Mailtrap para el envío de correos en vivo mediante Email API o SMTP. Cubre flujos transaccionales y masivos, incluyendo envíos por lotes, para configurar el correo saliente desde una aplicación. Úsala al construir o depurar integraciones de envío de correos electrónicos.

Instalación rápida

Claude Code

Recomendado
Principal
npx skills add mailtrap/mailtrap-skills -a claude-code
Comando PluginAlternativo
/plugin add https://github.com/mailtrap/mailtrap-skills
Git CloneAlternativo
git clone https://github.com/mailtrap/mailtrap-skills.git ~/.claude/skills/sending-emails

Copia y pega este comando en Claude Code para instalar esta habilidad

Documentación

Sending emails (Mailtrap)

Overview

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).

How to integrate (preference order)

Preferred order:

  1. Plugin or integration for the user's platform (no-code or minimal-config) where available
  2. Official SDK for your language when one exists (maintained clients, typed helpers, less room for URL/auth mistakes).
  3. HTTP Email API when there is no SDK or the SDK does not fit (direct POST to /api/send or /api/batch with JSON).
  4. SMTP only when you really need it (legacy stack, host/platform that only speaks SMTP, or hard constraints that rule out HTTP).

Choosing how to send

ApproachUse when
Transactional, single messageEmail generated by your app (password resets, receipts, notifications, alerts). One logical message per POST https://send.api.mailtrap.io/api/send
BulkPromotional email to contacts that you manage on your side and send at volume through Mailtrap. Not the same as "batch": bulk is the stream, not the batch endpoint.
BatchYou have multiple different messages to hand off at the same time (up to 500 per request). Cuts HTTP overhead; can be applied to both transactional and bulk
CampaignsPromotional email to recipients stored as Mailtrap contacts, using Mailtrap Campaigns (audiences, scheduling, reporting in the product). Recommended to avoid implementing contact management and email sending logic; requires UI setup before sends flow—this skill does not replace that workflow.

Before generating SDK code: read the README of the relevant SDK repository linked in the SDKs section below for current method signatures, constructor options, and examples. Do not rely on memory.

Related skills: authorizing-api-requests (tokens, env vars, auth headers), using-email-templates (template UUID and variables), testing-with-sandbox (safe testing), setting-up-sending-domain (verification before send).

When not to use

  • Sandbox only—capturing mail without delivery, reading messages in a sandbox (testing-with-sandbox).
  • The main ask is webhooks, step-by-step Campaigns UI setup, or deliverability deep-dives.
  • Exhaustive API reference—once the user's path is clear, link the official send docs for full schemas, optional fields, and edge cases.

Quick reference

Email API

StreamSend EndpointBatch EndpointAuthorization Header
TransactionalPOST https://send.api.mailtrap.io/api/sendPOST https://send.api.mailtrap.io/api/batchAuthorization: Bearer $MAILTRAP_API_TOKEN
Bulk (promotional / marketing volume)POST https://bulk.api.mailtrap.io/api/sendPOST https://bulk.api.mailtrap.io/api/batchAuthorization: Bearer $MAILTRAP_API_TOKEN

SMTP

SettingTransactionalBulk
Hostlive.smtp.mailtrap.iobulk.smtp.mailtrap.io
Port587 (also 25, 2525, 465 with SSL)587 (also 25, 2525, 465 with SSL)
Usernameapiapi
PasswordAPI token ($MAILTRAP_API_TOKEN)API token ($MAILTRAP_API_TOKEN)

Tokens

Use $MAILTRAP_API_TOKEN in either Authorization: Bearer ... or Api-Token: .... The same token works on both send.api.mailtrap.io and bulk.api.mailtrap.io as long as its scope covers the stream. Full guidance (scope, storage, rotation) lives in skill authorizing-api-requests.

Rate limits

ScopeLimitWindow
Sending API (per token)150 requests10 seconds

Use backoff on 429.

JSON body (non-template)

Typical fields include from, to, subject, and text and/or html. Optional: category, custom_variables. Exact request bodies: Transactional send and Bulk send.

Examples (curl)

Transactional send (send.api.mailtrap.io):

curl -X POST https://send.api.mailtrap.io/api/send \
  -H "Authorization: Bearer $MAILTRAP_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "from": {"email": "[email protected]", "name": "Your App"},
    "to": [{"email": "[email protected]"}],
    "subject": "Hello",
    "text": "Plain text body"
  }'

Bulk stream uses the same path and JSON shape on the bulk host (same env var; the token only needs bulk-stream scope):

curl -X POST https://bulk.api.mailtrap.io/api/send \
  -H "Authorization: Bearer $MAILTRAP_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "from": {"email": "[email protected]", "name": "Your App"},
    "to": [{"email": "[email protected]"}],
    "subject": "Promotional",
    "html": "<p>HTML body</p>"
  }'

Batch (array of messages; up to 500 per request — see API docs for full schema):

curl -X POST https://send.api.mailtrap.io/api/batch \
  -H "Authorization: Bearer $MAILTRAP_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"from":{"email":"[email protected]"},"to":[{"email":"[email protected]"}],"subject":"One","text":"..."}]}'

JSON body (template)

Use template_uuid and template_variables instead of raw text/html to use a template hosted by Mailtrap. Minimal example:

curl -X POST https://send.api.mailtrap.io/api/send \
  -H "Authorization: Bearer $MAILTRAP_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "from": {"email": "[email protected]", "name": "Your App"},
    "to": [{"email": "[email protected]"}],
    "template_uuid": "your-template-uuid",
    "template_variables": {"user_name": "Jane"}
  }'

See skill using-email-templates and the same API operations as non-template sends.

SDKs

Suppressions

Mailtrap automatically manages suppressions for addresses that hard bounce, report spam, or unsubscribe, and will not send emails to these suppressed recipients again. For details, see the Suppressions documentation.

Common mistakes

MistakeFix
Confusing batch with bulkBatch = many messages in one /api/batch request. Bulk = promotional stream/host and token
Promotional API mail on transactional hostUse bulk base URL and bulk token for promotional content you generate in code
Bulk traffic on send.api.mailtrap.ioPromotional/bulk stream uses bulk.api.mailtrap.io
Using sandbox SMTP host for live sendingLive sending uses live.smtp.mailtrap.io or bulk.smtp.mailtrap.io
SMTP username is an email addressUsername is api; password is the API token
Sending before domain is verifiedComplete Sending Domains setup and compliance (see setting-up-sending-domain)
Guessing SDK API from memoryRead the SDK README and OpenAPI-linked examples; do not invent constructors or method names
Choosing SMTP first for a greenfield appPrefer platform integration if one exists, then SDK, then HTTP API; SMTP only when necessary (see How to integrate)

Repositorio GitHub

mailtrap/mailtrap-skills
Ruta: skills/sending-emails
0
FAQ

Preguntas frecuentes

¿Qué es el Skill sending-emails?

sending-emails es un Skill de Claude creado por mailtrap. Los Skills agrupan instrucciones y recursos que Claude carga cuando los necesita para realizar tareas relacionadas con sending-emails sin indicaciones adicionales.

¿Cómo instalo sending-emails?

Usa los comandos de instalación de esta página: añade sending-emails a Claude Code como plugin o clona su repositorio en tu directorio de skills y reinicia Claude para cargarlo.

¿A qué categoría pertenece sending-emails?

sending-emails pertenece a la categoría Desarrollo.

¿Se puede usar sending-emails gratis?

Sí. sending-emails aparece en AIMCP y se puede instalar gratis.

Habilidades relacionadas

qmd
Desarrollo

qmd es una herramienta CLI de búsqueda e indexación local que permite a los desarrolladores indexar y buscar en archivos locales mediante búsqueda híbrida que combina BM25, embeddings vectoriales y reranking. Es compatible tanto con uso desde la línea de comandos como con modo MCP (Model Context Protocol) para integración con Claude. La herramienta utiliza Ollama para los embeddings y almacena los índices localmente, lo que la hace ideal para buscar documentación o bases de código directamente desde la terminal.

Ver habilidad
subagent-driven-development
Desarrollo

Esta habilidad ejecuta planes de implementación asignando un nuevo subagente para cada tarea independiente, con revisión de código entre tareas. Permite una iteración rápida mientras mantiene controles de calidad a través de este proceso de revisión. Úsala cuando trabajes en tareas mayormente independientes dentro de la misma sesión para garantizar un progreso continuo con verificaciones de calidad integradas.

Ver habilidad
mcporter
Desarrollo

La habilidad mcporter permite a los desarrolladores gestionar y llamar servidores del Protocolo de Contexto de Modelo (MCP) directamente desde Claude. Proporciona comandos para listar servidores disponibles, llamar a sus herramientas con argumentos, y manejar la autenticación y el ciclo de vida del daemon. Utiliza esta habilidad para integrar y probar la funcionalidad de servidores MCP en tu flujo de trabajo de desarrollo.

Ver habilidad
adk-deployment-specialist
Desarrollo

Esta habilidad despliega y orquesta agentes Vertex AI ADK utilizando el protocolo A2A, gestionando el descubrimiento de AgentCard, el envío de tareas y soportando herramientas como el Sandbox de Ejecución de Código y el Banco de Memoria. Permite construir sistemas multiagente con patrones de orquestación secuencial, paralela o en bucle en Python, Java o Go. Úsela cuando se le solicite desplegar agentes ADK u orquestar flujos de trabajo de agentes en Google Cloud.

Ver habilidad