mailtrap-sending-emails
它能做什么
这个工具帮助你通过 Mailtrap 发送真实邮件。你可以使用 Email API 或 SMTP 来设置发送,无论是事务性邮件(如订单确认),还是批量邮件(如电子报)。
适用场景
- ✓配置密码确认邮件的发送。
- ✓向客户发送推广电子报。
- ✓排查应用自动通知发送失败的问题。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mailtrap-sending-emails/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我该如何设置 Mailtrap,使用 API 发送事务性邮件?”
每周 5 个新技能,1 分钟读完。
工作原理
Mailtrap 提供多种发送邮件的方式,比如直接调用 API 或使用 SMTP 设置。你需要根据邮件的性质来选择最合适的方式:是系统通知(事务性邮件),还是营销活动(批量邮件)。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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).
When to Use
Use when integrating, configuring, or troubleshooting Mailtrap live email sending with Email API, SMTP, transactional streams, bulk streams, or batch requests.
How to integrate (preference order)
Preferred order:
- Plugin or integration for the user's platform (no-code or minimal-config) where available
- Official SDK for your language when one exists (maintained clients, typed helpers, less room for URL/auth mistakes).
- HTTP Email API when there is no SDK or the SDK does not fit (direct
POSTto/api/sendor/api/batchwith JSON). - 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
| Approach | Use when |
|---|---|
| Transactional, single message | Email generated by your app (password resets, receipts, notifications, alerts). One logical message per POST https://send.api.mailtrap.io/api/send |
| Bulk | Promotional 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. |
| Batch | You 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 |
| Campaigns | Promotional 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: mailtrap-testing-with-sandbox (safe testing) and mailtrap-setting-up-sending-domain (verification before send).
When not to use
- Sandbox only—capturing mail without delivery, reading messages in a sandbox (
mailtrap-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
…
常见问题
事务性邮件和批量邮件有什么区别?
事务性邮件由你的应用自动生成,比如密码重置、收据。批量邮件用于营销或推广,通常大量发送。
什么是“batch”?
“batch”指在一次请求中发送多封不同的邮件,以优化发送效率。它既可用于事务性邮件,也可用于批量邮件。
我可以用它来测试邮件而不真正发送吗?
不可以,这个工具用于发送真实邮件。如果要在不实际发送的情况下测试,请使用 'mailtrap-testing-with-sandbox' 技能。
详情
作者的原始描述
Configure or troubleshoot Mailtrap live email sending with Email API, SMTP, transactional streams, bulk streams, or batches.
热度
- GitHub 星标
- 48k
- 排名
- #5134
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。