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 儀表板的設計系統一致性。當使用者說「audit design」、「design alignment」、「dashboard design audit」、詢問關於……時,路由至此。
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 的導入並路由至…