跳到正文
Skillpedia
API 与服务器(后端)48k · #5135

mailtrap-setting-up-sending-domain

它能做什么

帮助你设置一个用于通过 Mailtrap 发送邮件的域名。这包括添加域名、验证域名确实属于你,以及配置必要的信息,以确保邮件能够正确送达。

适用场景

  • ✓为通过 Mailtrap 发送邮件而设置新域名时。
  • ✓域名验证不成功时。
  • ✓需要帮助配置 DNS 设置(SPF、DKIM、DMARC)时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mailtrap-setting-up-sending-domain/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mailtrap-setting-up-sending-domain/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想把我的域名 'myemail.com' 设置为通过 Mailtrap 发送邮件,但验证一直失败。”

每周 5 个新技能,1 分钟读完。

工作原理

你需要在域名的 DNS 系统中添加特定的记录(如 SPF、DKIM 和 DMARC)。Mailtrap 会提供这些准确的记录,你只需复制粘贴即可。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Setting up a Mailtrap sending domain

Overview

You must add and verify a domain you control before live sending. Mailtrap shows every DNS record required for that domain in the UI: add the complete set as given (do not cherry-pick). After DNS verifies, complete the compliance step if requested.

Subdomain vs root: add the exact hostname you will use in the From address. If you send from notifications.mycompany.com, add that subdomain as the sending domain—not only mycompany.com, unless you truly send from the root domain.

For step-by-step clicks at common hosts, open the matching guide on Sending domain setup (Cloudflare, Route 53, etc.) and follow it alongside the live UI values.

Related skills: mailtrap-sending-emails (after domain is ready).

When to use

  • New Sending Domains setup, stuck verification, or compliance questions
  • DNS at Cloudflare, AWS, Google, Namecheap, GoDaddy, DigitalOcean, etc.

When not to use

  • Sandbox-only testing without a custom domain (see mailtrap-testing-with-sandbox)

Authorization

The Sending Domains API calls below need Authorization: Bearer $MAILTRAP_API_TOKEN and an $MAILTRAP_ACCOUNT_ID in the path. Resolve $MAILTRAP_ACCOUNT_ID from GET https://mailtrap.io/api/accounts, and store tokens in environment variables or a secrets manager.

Automating setup (API and DNS providers)

Prefer this path when building scripts or AI-assisted automation:

  1. DNS records and status via API — Use the Sending Domains API:
  • GET https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/sending_domains — lists domains
  • GET https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/sending_domains/{sending_domain_id} — returns dns_records (each with type, name, value, and verification status) and dns_verified. Poll after you publish DNS.
  1. Create domain via API —
  • POST https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/sending_domains with domain_name when your flow provisions domains programmatically.
  1. Publish DNS programmatically —
  • Create the returned records at your DNS host using their API (e.g., Cloudflare API, AWS Route 53, Google Cloud DNS) or IaC. Align record names and values exactly with the API response.

Human fallback: Sending Domains > Add domain > copy values into the registrar UI > Verify when API automation is not available.

Workflow (summary)

  1. Sending Domains > Add domain and enter the domain name.
  2. Obtain required records from the UI or Sending Domains API; create all listed records at your DNS host exactly as shown (names, types, values).
  3. Wait for DNS propagation. If verification stays pending, use dig, nslookup, or an online DNS lookup to confirm each record is visible publicly before clicking Verify again.
  4. Complete the compliance flow when prompted.

Product walkthrough: Sending domain setup.

DNS provider guides (documentation)

Mailtrap publishes click-path guides for common providers. Open the page that matches the user's DNS host and follow it together with the live UI records:

If the user's provider is not listed, the same rule applies: copy every record from Mailtrap into the DNS zone that serves the From domain.

Important DNS caveat (proxied DNS)

…

常见问题

SPF、DKIM、DMARC 这类 DNS 记录是什么?

它们就像邮件的“真实性凭证”。它们能帮助邮件服务器确认从你的域名发出的邮件是合法的,而不是垃圾邮件。

什么是“DNS 传播”?

指新的 DNS 设置在全网更新所需的时间,通常从几分钟到几小时不等。

我能使用像 'contact.mydomain.com' 这样的子域名吗?

可以,你可以使用子域名。请确保在 Mailtrap 中添加你实际用于发送邮件的那个完整子域名。

详情

作者的原始描述

Add or verify a Mailtrap sending domain, troubleshoot DNS propagation, publish SPF/DKIM/DMARC records, and complete compliance.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5135
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能