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

send-with-resend

它能做什么

这个技能会谨慎地通过 Resend 发送邮件,因为已发出的邮件无法撤回。适合通过应用或工具发送事务性或批量邮件的人。

适用场景

  • ✓当你想通过 Resend 发送、定时发送或批量发送邮件的时候。
  • ✓当你想在邮件模板送达真实的人之前进行测试的时候。
  • ✓当你要把 Resend 发送功能接入代码库的时候。

技能链接

https://github.com/ParadevAI/Paradev/blob/main/plugins/resend/skills/send-with-resend/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请通过 Resend 发送一封欢迎邮件的测试版本,然后等我同意后再发送给真实的名单。”

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

工作原理

智能体会先检查发件域名是否已验证,先把邮件发送到 Resend 的测试地址并检查结果。只有在你确认后,才会发送给真实收件人。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

A sent email cannot be taken back

Every other Resend call can be run again. send-email and send-batch-emails put mail in someone's inbox, and nothing undoes that. Treat the send as the last step of a short checklist.

1. Check the sending domain

The from address must be on a domain the account has verified for sending. Run list-domains and find the domain of the from address:

  • verified: send.
  • pending, not_started, failed, or partly verified: do not send. Run get-domain and show the user the DNS records that are not verified yet.
  • Not in the list: the account cannot send from it. Ask which verified domain to use. Do not pick one for the user.

onboarding@resend.dev sends without a domain, but only to the account owner's own address. It is for a first test, not for real recipients.

2. Prove it on a test address first

Before a real recipient, send the same message to Resend's test addresses. Remove cc and bcc, and put only test addresses in to. A real address in any recipient field gets the test email before the user confirms in step 3.

  • delivered@resend.dev: delivered. Add a label for each case, for example delivered+welcome@resend.dev.
  • bounced@resend.dev: a hard bounce.
  • complained@resend.dev: delivered, then marked as spam.
  • suppressed@resend.dev: suppressed as an address that bounced before.

Then run get-email on the result. Its status is the truth: sent means Resend accepted the message, delivered means the receiving server accepted it.

3. Confirm before a real inbox

Show the user the from, to, cc, bcc, subject, and body, and wait for a clear yes. Get this confirmation every time. Approval for an earlier send does not cover this one.

  • Set an idempotencyKey (for example welcome/<user-id>), so a retry after a timeout cannot send the message twice.
  • To send later, set scheduledAt. cancel-email can stop a scheduled email until it is sent, and not after.
  • One message to many people who must not see each other is a batch (send-batch-emails, at most 100 per call), or a broadcast. It is not one email with a long to list.

4. Sending from code

When the user wants their application to send mail, read how the codebase already calls Resend and extend that path. The API key comes from the environment and never goes in the repo, a client bundle, or a log line. Send from the server only.

Anti-patterns

  • Testing on a real person. Use delivered@resend.dev until the message is right.
  • Reading sent as delivered. sent only means that Resend accepted it.
  • Retrying a send without an idempotency key. A timeout does not prove that the first send failed.
  • Changing the from domain so the send works. The user picks the sender, not the agent.
常见问题

它会在没有询问的情况下发送给真实的人吗?

不会。它会在真实收件人之前停下来,先请你确认。

如果发件域名没有验证怎么办?

它不会发送,并会向你展示仍需设置的 DNS 记录。

测试地址有什么用?

它们让你可以验证邮件的效果,包括已送达、被退回或被投诉的邮件的表现,而不会触达真实的收件箱。

详情

作者的原始描述

Send email through Resend without surprising anyone — check the sending domain first, prove the message on Resend's test addresses, and get the user's confirmation before mail goes to a real inbox. Use when the user asks to send, schedule, or batch-send an email, test a template, or wire Resend sending into a codebase.

repo: ParadevAI/Paradev

热度

GitHub 星标
16k
排名
#10840
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能