IA & Automation

AI email pipeline: copywriting is not the problem - since November 2025, Gmail has been rejecting your non-compliant mailings

Automating the writing of an email is easy. What decides whether it happens is compliance - and Gmail now definitively rejects out-of-standard senders. The complete architecture of a passing IA email pipeline.

19 sept 202510 min de lecturePASCAL POTVIN
Écouter l'article

Email has the best ROI, and the worst supply chain

Email is still the channel with the best ROI, and yet its production remains artisanal in most organizations: copywriting, validation, design, HTML integration, rendering tests, segmentation, sending - several people, several days per campaign. Language model APIs and frameworks such as React Email or MJML automate this end-to-end chain. But here's what the promise of "one-click copywriting to sending" obscures: copywriting is the easy part. The hard part, the part that decides whether your email lands in the inbox or in the void, is sender compliance. And as of November 2025, it's no longer forgivable.

This article details the complete architecture of a pipeline I've deployed in production - CMS headless, API Claude, React Email, Resend, orchestrated by Next.js - devoting to deliverability the place it really deserves.

Five-step architecture

The pipeline is broken down into five separate, independent stages. A headless CMS - I use Sanity for its real-time collaboration - serves as the entry point where the team defines the brief, segment and send date. The Claude API generates the personalized content. React Email or MJML transforms this content into client-compatible HTML. Resend or SendGrid ensures delivery. Analytics close the loop. Orchestration is based on Next.js route APIs on Vercel, with Vercel Cron for scheduled delivery. Each step is a module with a clear interface: moving from MJML to React Email, or from Resend to SendGrid, only affects one module. This modularity is the key to maintainability.

On the choice of template engine: MJML, now in version 5, remains the most reliable for Outlook compatibility; React Email, developed by the Resend team, is more natural for a team already using React, and provides the type security of TypeScript. Both produce production-quality responsive HTML.

Generating content with Claude

Generation relies on a prompt system that encodes editorial identity: tone of voice, preferred structures, target lengths, forbidden formulations. With prompt caching, this permanent context is cached on the server side, reducing the cost and latency of repeated calls. For the template, I apply tiering logic rather than an outdated version number: an Opus template for high-stakes corporate communications, a Sonnet for routine newsletter production, a Haiku for mass generation of subject line variants via the API batch.

Structured output is non-negotiable for integration. I define a schema that Claude fills in via tool use, which guarantees a deterministic format directly consumable by the template engine.

json { "subject": "string (max 60 characters)", "preheader": "string (max 90 characters)", "sections": [ { "heading": "string", "body": "string", "cta": { "label": "string", "url": "string" } } ] }


## Templates, in modular sections

React Email is used like standard React: Html components, Container, Section, Text, Button, plus a Tailwind wrapper for styling, and `npx react-email dev` for a real-time preview. I design my templates in independent sections - header, hero, body, CTA, footer with unsubscribe - each with its own props. The assembly script composes the sections according to email type and injects Claude-generated content. A single system covers newsletters, promotions, transactions and drip sequences. Important detail: I systematically check that the HTML remains under 102 Kb, the threshold beyond which Gmail truncates the message.

## The real difficulty: deliverability, and it's got teeth!

This is where most "one-click" pipelines fail silently. Since February 2024, Gmail and Yahoo have imposed three requirements on mass senders - 5,000 e-mails a day or more to personal addresses: full SPF, DKIM and DMARC authentication; one-click unsubscribe via the List-Unsubscribe header; and a spam complaint rate kept below 0.3%, ideally below 0.1%. Microsoft followed suit in May 2025 for Outlook, Hotmail and Live.

:::callout{type="warning" title="Without authentication, nothing gets delivered"}
In November 2025, Google moved from simple temporary delays to permanent rejections: a message that fails authentication or comes from a sender with a high spam rate now receives a definitive 5xx rejection, with no possible retry. Microsoft returns an error 550 5.7.515. In other words, a pipeline that generates perfect content but neglects authentication no longer "delivers spam" - it doesn't deliver at all. Sender compliance is no longer good practice, it's the condition of your channel's existence.
:::

The pipeline must therefore integrate from the outset: SPF/DKIM/DMARC configuration, progressive warmup of sending IPs, automatic management of bounces and complaints, functional List-Unsubscribe header, and compliance with RGPD and CAN-SPAM with suppression lists. The choice of sending infrastructure has a direct influence on all this.

| Service | Strength | Ideal for
|---|---|---|
| Resend | modern API, integrated with React Email | React products, prototyping (free tier) |
| SendGrid | advanced reputation management | enterprise, high volumes |
| Amazon SES | lowest cost, very high volumes |
| Postmark | exceptional transactional deliverability | transactional emails

## The optimization loop

This is what turns a static tool into a learning system. Each campaign's open, click and conversion rates are correlated to variations in content, subject lines, send times and segments, and this data feeds the progressive adjustment of Claude prompts and send parameters. After three months, the teams I've worked with have seen a 20-30% improvement in engagement compared to their manual production. But this optimization is only valid if the emails arrive. This is the reversal that needs to be integrated in 2026: an AI email pipeline is not first and foremost a content generator, it's a compliance and deliverability system to which generation has been grafted. Reverse this order of priority, and the most beautiful content in the world will bounce with a 5xx code.
§ COMMENTAIRES

Laisser un commentaire