email-best-practices

Guides implementation of deliverable, compliant transactional and marketing email systems.

Updated Sep 5, 2023
One-click install
npx skills add https://github.com/eyenalxai/dotfiles --skill email-best-practices-eyenalxai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: email-best-practices
Source: https://github.com/eyenalxai/dotfiles/tree/main/.agents/skills/email-best-practices
Command: npx skills add https://github.com/eyenalxai/dotfiles --skill email-best-practices-eyenalxai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building email features involves many failure points: messages landing in spam due to missing SPF/DKIM/DMARC authentication, duplicate sends from naive retry logic, legal exposure from CAN-SPAM/GDPR/CASL violations, and inaccessible templates that screen readers cannot parse. This Skill provides structured guidance across the entire email lifecycle so these issues are addressed systematically. ## Core Features & Use Cases - Deliverability & Authentication: Set up SPF, DKIM, and DMARC DNS records, warm up sending IPs, and troubleshoot spam placement with diagnostic tools like Google Postmaster Tools. - Transactional & Marketing Email Patterns: Plan the emails your app needs (password resets, OTPs, order confirmations) and implement consent-based marketing with double opt-in and one-click unsubscribe. - Production Reliability: Implement idempotency keys, exponential backoff retries, webhook signature verification, and suppression list management for bounces and complaints. - Use Case: You are launching a SaaS app and need password reset emails that reach inboxes. Use this Skill to configure DNS authentication, design the reset email with proper accessibility markup, add idempotent sending with retry logic, and process bounce webhooks to keep your list clean. ## Quick Start Ask the agent to help set up SPF, DKIM, and DMARC records for your sending domain and plan the transactional emails your app needs.

Frequently Asked Questions about email-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up SPF, DKIM, and DMARC for my domain?

Add an SPF TXT record listing authorized sending servers, publish the DKIM TXT record provided by your email service, and create a DMARC record starting with p=none for monitoring. Verify each record with dig commands before sending.

Why are my emails going to spam?

Check authentication first, since Gmail and Yahoo reject unauthenticated email. Then verify the List-Unsubscribe header, sender reputation and blacklist status, content quality, and sending patterns such as sudden volume spikes.

What is the difference between transactional and marketing emails?

Transactional emails facilitate a user-initiated action like password resets or order confirmations and can be sent without opt-in. Marketing emails are promotional, require explicit consent, and must include an unsubscribe mechanism.

How do I prevent duplicate emails when retrying failed sends?

Send a deterministic idempotency key derived from the business event, such as order-confirm-{orderId}, with each request. The server returns the original response for repeated keys instead of sending again, typically within a 24-hour window.

Does GDPR require double opt-in for marketing emails?

GDPR requires explicit, freely given, and informed opt-in consent, which pre-checked boxes do not satisfy. Double opt-in is the recommended implementation because it verifies the address and documents consent, and it is required in some regions like Germany.

How should I handle email bounce webhook events?

Verify the webhook signature, return a 200 response quickly, and process events asynchronously with idempotent handling. Suppress hard bounces and complaints immediately, and suppress soft bounces after roughly three failures.