email-best-practices

bởi resend

Sử dụng khi xây dựng tính năng email, email bị đánh dấu spam, tỷ lệ bounce cao, thiết lập xác thực SPF/DKIM/DMARC, triển khai thu thập email, đảm bảo…

npx skills add https://github.com/resend/resend-skills --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.

Thêm skills từ resend

send-email
resend
Gửi email giao dịch và số lượng lớn qua Resend API với điểm cuối đơn hoặc hàng loạt. Chọn điểm cuối đơn cho từng email có tệp đính kèm hoặc lên lịch; sử dụng điểm cuối hàng loạt cho 2–100 email riêng biệt trong một yêu cầu để giảm số lần gọi API. Triển khai khóa idempotency (định dạng <event-type>/<entity-id>) để ngăn gửi trùng lặp khi thử lại, với thời gian hết hạn 24 giờ. Chỉ thử lại các phản hồi 429 (giới hạn tốc độ) và 500 (lỗi máy chủ) bằng cách sử dụng backoff theo cấp số nhân; sửa lỗi xác thực 400/422 mà không...
templates
resend
Sử dụng khi tạo, cập nhật, xuất bản, xóa hoặc liệt kê các mẫu email Resend qua API, hoặc khi định nghĩa biến mẫu, hiểu về bản nháp so với…
design-audit
resend
Kiểm tra bảng điều khiển Resend về mức độ tuân thủ hệ thống thiết kế. Được chuyển đến đây khi người dùng nói "kiểm tra thiết kế", "tuân thủ thiết kế", "kiểm tra thiết kế bảng điều khiển", hỏi về…
marketing-pages
resend
Sử dụng khi tạo, cập nhật, chỉnh sửa hoặc xóa các trang marketing/trang công khai trong codebase Resend. Bao gồm cấu trúc trang, quy tắc tái sử dụng component và…
resend-design-skills
resend
Sử dụng khi cần tài nguyên thiết kế Resend. Dẫn đến hướng dẫn thương hiệu, nhận diện hình ảnh, thành phần giao diện, token thiết kế và mẫu trang tiếp thị.
resend-design-system
resend
Sử dụng khi xây dựng hoặc sửa đổi giao diện người dùng trong mã nguồn Resend. Cung cấp API thành phần, tùy chọn biến thể, token thiết kế, mẫu cấu trúc cho tất cả src/ui/…
react-email
resend
Xây dựng và gửi email HTML bằng các component React với kiểu dáng an toàn cho client và kiểm tra xem trước. Phát triển email dựa trên component với hỗ trợ TypeScript, bao gồm các component bố cục cốt lõi (Html, Body, Container, Section, Row, Column) và các phần tử nội dung (Heading, Text, Button, Image, CodeBlock). Tạo kiểu Tailwind CSS thông qua component Tailwind với preset dựa trên pixel; bố cục dạng bảng cần thiết để tương thích với client email. Máy chủ xem trước cục bộ tại localhost:3000 với chỉnh sửa trực tiếp;...
resend-migrate
resend
Sử dụng khi di chuyển từ SendGrid, Mailgun hoặc Postmark sang Resend - phát hiện các import @sendgrid/mail, sgMail, SENDGRID_API_KEY, mailgun, postmark và định tuyến đến…