DEV Community

Peter Park
Peter Park

Posted on

How I Built a Cold Email Generator Without Storing a Single Email

When I started building ColdMailAI, one of the first architectural decisions I had to make was: should I store user emails?

The answer was no. Here's why, and how the system works without it.

The Privacy-First Approach

Most email tools store your generated emails, contacts, and campaign data on their servers. That's fine for full-blown CRM platforms, but for a tool that generates cold email copy, it's unnecessary overhead and a liability.

ColdMailAI generates personalized cold emails using AI, but it doesn't need to remember what it generated. The user provides context (who they're reaching out to, what they're selling, the tone they want), the AI generates the email, and the user copies it. Done.

The Tech Stack

Here's what powers the app:

  • Next.js on Vercel for the frontend and API routes
  • OpenAI API for email generation
  • PayPal for subscription payments
  • Vercel Blob for minimal asset storage
  • No database for user-generated content

The lack of a traditional database for email content keeps things simple. No migrations, no backup strategy for PII, no GDPR data deletion requests to handle.

How Generation Works

The flow is straightforward:

  1. User fills in the form (recipient info, product/service description, desired tone)
  2. Frontend sends a POST request to an API route
  3. API route calls OpenAI with a carefully crafted system prompt
  4. Response streams back to the user
  5. User copies the result - nothing is stored server-side

Lessons From Building It

1. Start with the simplest architecture that works.
I could have built a full platform with saved drafts, campaign management, and A/B testing. Instead, I shipped a focused tool that does one thing well: generate cold email copy.

2. Streaming responses matter for UX.
Nobody wants to stare at a loading spinner for 5 seconds. Streaming the AI response token-by-token makes the app feel fast and responsive.

3. Cost management is everything with AI products.
Using gpt-4o-mini instead of gpt-4o for email generation cut costs significantly while maintaining quality. For structured, shorter outputs like emails, the smaller model performs well.

4. The landing page matters more than the product (initially).
I spent way too long perfecting the generation logic and not enough time on the landing page copy. The conversion rate improved once I rewrote the hero section to focus on the user's pain point rather than the technology.

What's Next

I'm working on adding:

  • Multiple email variations in a single generation
  • Industry-specific templates
  • Follow-up sequence suggestions

If you're building an AI-powered tool and debating architecture, consider whether you actually need to store the output. Sometimes the simplest approach is the right one.

Check it out at getcoldmail.com - feedback welcome.

Top comments (0)