close

DEV Community

Rahul Yadav
Rahul Yadav

Posted on

We Built an Email API Because Sending Email Shouldn't Be This Complicated

Building a SaaS product usually starts with something exciting: the product itself.

Then you need authentication.

Then payments.

Then storage.

Then queues.

And eventually, email.

That's when things get surprisingly complicated.

We started building MailerMine after running into this problem ourselves while building SaaS applications.

We needed to send transactional emails reliably, manage domains, authenticate sending, track what happened to each message, and give developers a clean API to work with.

The actual API call was easy.

Everything around it wasn't.

So we decided to build the email infrastructure we wanted to use ourselves.

The problem with sending email

At first, sending an email looks incredibly simple:

Mail::to($user->email)->send($email);
Enter fullscreen mode Exit fullscreen mode

But production email is much more than sending a message.

You eventually need to think about:

  • Domain verification
  • SPF
  • DKIM
  • DMARC
  • API authentication
  • Queues
  • Delivery events
  • Bounces
  • Failures
  • Webhooks
  • Email logs
  • Rate limits
  • Monitoring
  • Provider-specific APIs

And when something goes wrong, you need to know what actually happened to the email.

Was it accepted?

Was it delivered?

Did the recipient's server reject it?

Was the domain configured correctly?

Did the API request fail?

Those are the problems we wanted MailerMine to make easier.

What we built

MailerMine is a developer-first email infrastructure platform for applications and SaaS products.

The core integration is intentionally simple.

For example:

curl -X POST https://mailermine.com/api/v1/emails \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "hello@yourdomain.com",
    "to": "user@example.com",
    "subject": "Welcome!",
    "html": "<h1>Welcome to our application</h1>"
  }'
Enter fullscreen mode Exit fullscreen mode

The goal is simple:

Get an API key → authenticate your domain → make an API request → send email.

From there, MailerMine handles the infrastructure around the message.

What you can do with MailerMine

Send transactional email

Password resets, verification emails, invoices, notifications, welcome emails, and other application-generated messages can be sent through the API.

Manage sending domains

You can connect your own domain and configure the required email authentication records rather than forcing your users to send from a shared provider domain.

Track email activity

Instead of treating the API response as the end of the process, MailerMine keeps track of email activity so you can understand what happened after the request was made.

Monitor from one dashboard

The dashboard gives developers a place to inspect email activity, delivery status, domains, API keys, and other infrastructure instead of having to piece everything together.

Build with APIs

We're designing MailerMine around developers first.

That means APIs, documentation, predictable responses, and tooling are not an afterthought.

The stack behind it

MailerMine is built using:

  • Laravel
  • PHP
  • PostgreSQL
  • React
  • TypeScript
  • Inertia
  • AWS infrastructure
  • Queue-based email processing

The architecture is designed around asynchronous email processing rather than making every application request wait for the email provider.

A simplified flow looks like:

Your Application
       ↓
MailerMine API
       ↓
Validation
       ↓
Queue
       ↓
Email Provider
       ↓
Recipient
       ↓
Delivery Events
       ↓
MailerMine Dashboard
Enter fullscreen mode Exit fullscreen mode

This separation is important because sending an email shouldn't become a dependency that slows down your application's request lifecycle.

We're starting with 3,000 free emails

We're making 3,000 emails per month free so developers can actually build and test with MailerMine before worrying about another infrastructure bill.

Our focus right now isn't simply adding another email API to the market.

It's figuring out what developers actually need from email infrastructure.

We've learned a lot already from dealing with domains, authentication, provider APIs, delivery events, queues, and the edge cases that don't appear when you're sending your first test email.

And we're still learning.

What we want feedback on

This is where we'd especially like to hear from other developers.

If you've used services such as Amazon SES, Resend, Postmark, Mailgun, or SendGrid:

What is the most frustrating part of your current email infrastructure?

Is it:

  • Deliverability?
  • Domain setup?
  • Pricing?
  • API design?
  • Debugging failed emails?
  • Analytics?
  • Webhooks?
  • Managing multiple environments?
  • Something else?

We're building MailerMine in public enough to learn from people who actually have these problems.

You can try it here:

https://mailermine.com

If you're building a SaaS, API, marketplace, or any application that sends email, I'd love to hear what you'd want from an email infrastructure platform.

The product is live, and we're just getting started.

Top comments (0)