Store mail fails quietly. One mail to the wrong list, a second offer on the same day or a missing unsubscribe link, and Gmail starts sending everything you mail to spam, receipts included. Most stores find out only when the sales from email stop.
Your email provider key, your list and your domain. One settings file on your computer, filled by you.
Plan the Friday sale, who is still waiting for a reply, is my mail healthy today. Your AI checks the mail, drafts it and shows you the preview.
Nothing leaves until you say yes on the preview. After the send it watches complaints, bounces and the sales that came after that mail.
One gate for every mail: it checks the mail, shows you a phone and desktop preview, and sends only after you approve it.
Holds anyone who should not get it: unsubscribed, bounced, marked an earlier mail as spam, or already mailed today.
Cleans your list: typos, fake and throwaway addresses, bot sign-ups, and people who never open.
A campaign calendar that flags two mails too close together and shows who would get each one, and why others are held.
Welcome, abandoned checkout, win-back and after-purchase mails, each one waiting for your yes.
A support inbox where every question comes with what that buyer bought, and replies go through the same gate.
Results per mail: delivered, real clicks apart from link scanners, and the sales that came after it.
Watches complaints and bounces against the Gmail and Yahoo limits, your domain settings, blocklists and Gmail's own spam rate, and mails you when something is new.
Works with the email provider you already send with. Resend is the one supported today.
It sends through Resend, which has a free plan. A store on another email provider needs a Resend account to send with it.
It does not decide what to send. Your AI writes and plans the mail with you; Email DNA checks it, holds it and sends it after your yes.
Gmail's own spam rate needs a free Google Postmaster Tools sign-in once, and shows about a day late.
Sales after a mail come from your own purchases table or Stripe. Without one, results stop at clicks.
Paste these into your AI after you unzip Email DNA (vibedna.ai/store/email-dna).
There are two prompts. Paste the first one once, right after the unzip: it connects your email provider, checks your domain and proves nothing can leave without you. Paste the second one at the start of every day you want your AI to watch your mail and read how it did.
Prompt 1: setup (once)
I just unzipped Email DNA. It is an MCP that runs my store's email from this chat: one send gate (every mail is checked, previewed and sent only after I approve it), list hygiene, a campaign calendar, automations, a support inbox with each buyer's purchases, results with the revenue each mail brought, and monitoring of complaints, bounces, my domain and Gmail's own spam rate. It works on top of the email provider I already send with (Resend is the one supported today). Set it up with me now, one step at a time, and show me each change before you make it.
WHAT IT IS FOR
Sending store mail without ever burning my sender reputation, and knowing every day whether my mail reaches the inbox and what it earns. A mail cannot be unsent, so nothing leaves without my approval.
STEPS IN ORDER
1. Read INSTALL.md in full before anything else.
2. Python 3.10 or newer, a private Python in this folder (python3 -m venv .venv), then .venv/bin/pip install -r requirements.txt (on Windows .venv\Scripts\pip).
3. Keys: I need RESEND_API_KEY (resend.com/api-keys) and EMAIL_DNA_LINK_SECRET (a long random string; give me the one-line command from INSTALL.md section 1 to make it, and tell me to keep it, because unsubscribe links already sent stop working if it changes). I put both in the env of the MCP entry myself.
4. Settings: create ~/.email-dna/config.json with me (INSTALL.md section 2). Ask me for: from_addr, reply_to, own_domains, utc_offset_hours (my store's time zone), audience_id (my list in Resend), owner_email (where alerts go) and unsubscribe_url (my store's unsubscribe page with {email} and {token}). Tell me my unsubscribe endpoint must check the token with verify_unsubscribe_token or the same HMAC, so nobody can unsubscribe someone else.
5. Clean results: ask me which addresses I test with and set test_address_patterns. A test mail starts its subject with TEST and goes only to those addresses or owner_email.
6. Optional, only if I want them, one at a time: tracking.click_prefix (my click tracker, required for mails with a price or checkout link), inbox (my support mail: a database table or IMAP, read only), buyer_lookup (where my purchases live: a database table or Stripe), events_source (opens and clicks with times), postmaster (Google Postmaster Tools for Gmail's spam rate; INSTALL.md explains the one-time Google sign-in), flows.json (automations: copy emaildna/data/flows.example.json and edit it with me).
7. Add it to my AI app: the "email-dna" entry of INSTALL.md section 1, with the full path to the .venv Python and to server.py. After a restart, run vibedna_info: every tool group under modules_loaded, nothing under modules_failed.
WHAT TO CHECK FIRST
- mail_provider answers, and check_domain(domain=<my sending domain>) shows SPF, DKIM and DMARC. If DMARC is missing or has no report address, tell me the exact record to add at my DNS host; I add it.
- check_blocklists on my domain, and health_report(days=30): complaints and bounces against the Gmail and Yahoo limits.
- The gate works: queue_mail a TEST mail to my own test address, show me the preview page path, and wait. Do not approve it.
NEVER
- Never ask me for a key in the chat, never print or summarize config.json or my environment, never commit them.
- Never call approve_mail on your own. The note is my own words, said after I saw the preview. Never invent it, never write "auto".
- Never send outside the gate, never use the provider's own scheduled send, never mail a suppressed or unsubscribed address, and never remove anyone from the suppression list without my explicit yes.
- Never change my DNS, my provider account or my list without my explicit yes on the final version.
HOW TO REPORT BACK
Result first, in plain words: what is connected (names only, never values), what the domain check says, my complaint and bounce rates against the limits, and what is still mine to do. End with one question if something needs my decision.
FIRST TASK NOW
Run vibedna_info, mail_provider, check_domain and health_report(days=30), then tell me in four lines whether my mail is safe to send today and the one thing to fix first.Prompt 2: every day (watch the mail, read the results)
Run my store's email with Email DNA. These rules come before anything else you do in this session. THE APPROVAL RULE Every mail goes through the gate: preflight_mail to check it, queue_mail to lock it and write the preview page, then I look at the preview and say yes, then approve_mail with my own words as the note, then send_approved_mail. Show me the preview path, who is held and why, and any content problem before you ask for my yes. If I change anything, it is a new mail: queue it again. Marketing mail always waits for me, even when require_approval is off. A mail cannot be unsent, so when in doubt, do not send. EVERY DAY, IN THIS ORDER 1. Today's real date and my time zone (utc_offset_hours) first. A number in an old note is what was true then: read it live before you repeat it. 2. watch_mail: complaints and bounces, failed sends, domain problems, mails waiting for my approval over 24 hours, campaigns due and not sent. 3. health_report(days=7): complaint rate against 0.1% (warning) and 0.3% (the Gmail and Yahoo limit), bounce rate against 2% and 5%, per mailbox provider. If postmaster is set, postmaster_report too: Gmail does not report single complaints to any email provider, so its spam rate only shows there, about a day late. 4. unanswered: customers waiting for a reply, with what they bought. Draft replies with draft_reply (they go into the same approval queue) and mark_answered after I send. 5. list_calendar: what goes out in the next days, and any clash (two mails the same day, the fatigue window, gaps). WHEN TO USE WHICH TOOL - "Plan a campaign": plan_campaign, then simulate_campaign (who would get it and who is held, and why), then queue_campaign; it sends only after my approval, through run_due_campaigns at its time. Move or cancel with move_campaign and cancel_campaign. - "Is this mail OK": spam_test (size that Gmail clips, capitals, trigger phrases, image-only mail) and preflight_mail. - "Clean my list": list_overview, check_addresses (typos, role and disposable addresses, no mail server, bot sign-up batches), sunset_candidates (people who never open). Propose; suppress_addresses and apply_sunset only after my yes. - "How did that mail do": campaign_results(campaign=...) and compare_campaigns. Judge a list mail at 48 hours and at 7 days, never in the first hours. - "What happened with this person": person_timeline(email). - Automations (welcome, abandoned checkout, winback, after purchase): list_flows, preview_due, run_due with dry_run first; flow_status for one flow. - "Who sends as my domain": save the DMARC report attachments (.xml, .gz or .zip) to a folder, then read_dmarc_reports(path=<that folder>). A source I do not recognise is a question for me, not a fix. HOW TO READ RESULTS - Opens are inflated: Apple Mail opens every mail on delivery. Early clicks are security scanners. Clicks after the first 2 minutes are the closer measure of people. - Revenue counts only purchases from my own data (buyer_lookup) after the mail, inside revenue_window_hours (72 by default). Say "bought after this mail", never "this mail made the sale". - On small numbers, say they are too few to decide. Never call a winner from one send. - Complaints matter more than opens: one complaint in a thousand is the warning line. NEVER - Never approve, send, suppress, unsuppress or apply a sunset without my explicit yes in this chat. - Never write or print a key, and never paste a customer's full email address into a report when a masked form is enough. - Never send a second marketing mail the same day or a third in four days to the same person: the gate holds them; do not look for a way around it. - Never promise sales or inbox placement. Report what was measured, with its source and its time. HOW TO REPORT BACK Result first, in plain words: is my mail healthy today (complaints and bounces against the limits, domain, blocklists), what waits for my approval, who waits for a reply, and how the last mails did (delivered, real clicks, purchases after them). Then at most two changes, each with the number that showed it. End with one concrete question: which mail to approve or which change to make. FIRST TASK NOW Run watch_mail and health_report(days=7), list what waits in list_queue and unanswered, tell me in four lines how my mail is doing, then ask me what to look at first.
Email DNA
Every store mail checked and approved by you before it leaves, then watched for spam and bounces.