email-best-practices

作者: resend

构建可投递、合规且用户友好的电子邮件系统的全面指南。涵盖身份验证设置(SPF/DKIM/DMARC)、垃圾邮件故障排查以及防止邮件进入垃圾箱的可投递性最佳实践。包含事务性邮件(密码重置、一次性密码、确认邮件)和营销邮件的模板与模式,并附有适当的同意工作流程。提供针对CAN-SPAM、GDPR和CASL法规的合规框架,以及双重选择加入和抑制列表...

npx skills add https://github.com/resend/email-best-practices --skill email-best-practices

Email Best Practices

Guidance for building deliverable, compliant, user-friendly emails.

Architecture Overview

[User] → [Email Form] → [Validation] → [Double Opt-In]
                                              ↓
                                    [Consent Recorded]
                                              ↓
[Suppression Check] ←──────────────[Ready to Send]
        ↓
[Idempotent Send + Retry] ──────→ [Email API]
                                       ↓
                              [Webhook Events]
                                       ↓
              ┌────────┬────────┬─────────────┐
              ↓        ↓        ↓             ↓
         Delivered  Bounced  Complained  Opened/Clicked
                       ↓        ↓
              [Suppression List Updated]
                       ↓
              [List Hygiene Jobs]

Quick Reference

Need to...See
Set up SPF/DKIM/DMARC, fix spam issuesDeliverability
Build password reset, OTP, confirmationsTransactional Emails
Plan which emails your app needsTransactional Email Catalog
Build newsletter signup, validate emailsEmail Capture
Send newsletters, promotionsMarketing Emails
Ensure CAN-SPAM/GDPR/CASL complianceCompliance
Decide transactional vs marketingEmail Types
Handle retries, idempotency, errorsSending Reliability
Process delivery events, set up webhooksWebhooks & Events
Manage bounces, complaints, suppressionList Management
Make emails accessible (screen readers, alt text, contrast)Accessibility

Start Here

New app? Start with the Catalog to plan which emails your app needs (password reset, verification, etc.), then set up Deliverability (DNS authentication) before sending your first email.

Spam issues? Check Deliverability first—authentication problems are the most common cause. Gmail/Yahoo reject unauthenticated emails.

Marketing emails? Follow this path: Email Capture (collect consent) → Compliance (legal requirements) → Marketing Emails (best practices).

Production-ready sending? Add reliability: Sending Reliability (retry + idempotency) → Webhooks & Events (track delivery) → List Management (handle bounces).

Accessibility? Most emails fail basic accessibility checks. See Accessibility for lang/dir, presentational tables, headings, alt text, <title>, and contrast.

来自 resend 的更多技能

send-email
resend
通过Resend API的单次或批量端点发送事务性邮件和批量邮件。单次端点适用于带附件或定时发送的单独邮件;批量端点可在一次请求中发送2–100封不同邮件,以减少API调用。使用幂等键(格式为<事件类型>/<实体ID>)防止重试时重复发送,有效期24小时。仅对429(速率限制)和500(服务器错误)响应采用指数退避重试;修复400/422验证错误时不重试...
templates
resend
在通过API创建、更新、发布、删除或列出Resend电子邮件模板时使用,或用于定义模板变量、理解草稿与…的区别。
design-audit
resend
审计 Resend 仪表盘的设计系统一致性。当用户说"审计设计"、"设计一致性"、"仪表盘设计审计"、询问关于……时,路由到此。
marketing-pages
resend
在Resend代码库中创建、更新、编辑或删除营销/公开页面时使用。涵盖页面结构、组件复用规则以及……
resend-design-skills
resend
当需要Resend设计资源时使用。可获取品牌指南、视觉识别、UI组件、设计令牌及营销页面模式。
resend-design-system
resend
在 Resend 代码库中构建或修改 UI 时使用。提供所有 src/ui/… 的组件 API、变体选项、设计令牌和组合模式。
react-email
resend
使用React组件构建并发送HTML电子邮件,支持客户端安全样式和预览测试。基于组件的电子邮件开发,提供TypeScript支持,包含核心布局组件(Html、Body、Container、Section、Row、Column)和内容元素(Heading、Text、Button、Image、CodeBlock)。通过Tailwind组件实现Tailwind CSS样式,采用基于像素的预设;为兼容邮件客户端需使用表格布局。本地开发服务器预览地址为localhost:3000,支持实时编辑;...
resend-migrate
resend
在从SendGrid、Mailgun或Postmark迁移到Resend时使用——检测@sendgrid/mail、sgMail、SENDGRID_API_KEY、mailgun、postmark的导入并路由到…