September 23, 2025·5 min read

On-Demand SMTP & IMAP Credentials: Give Every User Their Own Email Inbox

developerSaaSSMTPIMAPAPI

Some products need to give users their own real email address. Not a forwarding alias, not a webhook endpoint — a real inbox with SMTP and IMAP credentials that works with any email client.

Ticketing systems need to receive customer emails at support-{id}@domain.com. Project management tools need per-project inboxes. Customer service platforms need agents to send and receive as themselves. CRM tools need to track email conversations natively.

The traditional solution is running your own mail server. The modern alternative is creating inboxes on demand through a service that handles the infrastructure.

The Traditional Approach: Run Your Own Mail Server

Setting up Postfix, Dovecot, and the supporting infrastructure for multi-tenant email is a serious undertaking:

  • DNS configuration: MX records, SPF, DKIM, DMARC — per domain
  • Server management: Postfix for SMTP, Dovecot for IMAP, SpamAssassin or rspamd for filtering
  • Storage: Email storage grows unpredictably; you need monitoring and cleanup policies
  • Deliverability: IP reputation management, feedback loops, bounce handling
  • Security: TLS certificates, authentication, rate limiting, abuse prevention
  • Monitoring: Queue depth, delivery rates, bounce rates, storage usage

This is a full-time job for an operations team. For most SaaS products, email infrastructure isn't the product — it's a supporting feature. Investing engineering time in mail server ops is a distraction from building what your users actually pay for.

The Reusable.Email Approach

Instead of running mail servers, create managed inboxes through Reusable.Email. Each managed inbox is a complete email account with:

  • IMAP: imap.reusable.email:993 (SSL/TLS) — read email programmatically
  • SMTP: smtp.reusable.email:587 (STARTTLS) — send email as the inbox address
  • POP3 — for clients that prefer it
  • 365-day retention
  • Custom folders, spam filtering, forwarding

Cost: $3 per inbox, one-time. No monthly per-user fees.

For products that need programmatic inbox creation at scale, the whitelabel tier ($30/month) adds:

  • REST API for creating and managing inboxes
  • Webhooks for real-time email events
  • Unlimited managed inboxes
  • Your own domain, zero Reusable.Email branding
  • Admin panel and usage analytics

Architecture: How This Fits in a SaaS Product

Here's how a typical integration works:

1. User Signs Up for Your Product

When a new user (or project, or ticket queue) needs an email address, your backend creates a managed inbox via the whitelabel API.

POST /api/inboxes
{
  "address": "user-12345@yourdomain.com",
  "display_name": "Support - Acme Corp"
}

The API returns IMAP/SMTP credentials for the new inbox.

2. Store Credentials in Your Database

Map the inbox credentials to the user in your database:

users table:
  id: 12345
  name: "Acme Corp"
  inbox_address: "user-12345@yourdomain.com"
  imap_user: "user-12345@yourdomain.com"
  imap_pass: (encrypted)
  smtp_user: "user-12345@yourdomain.com"
  smtp_pass: (encrypted)

3. Receive Email — Two Options

Option A: IMAP polling. Your backend connects to IMAP periodically and pulls new messages into your application. This works for batch processing or situations where a few seconds of latency is acceptable.

Option B: Webhooks. The whitelabel tier sends an HTTP POST to your endpoint when email arrives. This is real-time and requires no polling. See How to Receive Emails via API for implementation details.

4. Send Email

When the user needs to send email from your product (reply to a customer, send an update), your backend sends via SMTP using the inbox's credentials:

import smtplib
from email.mime.text import MIMEText

def send_as_user(user, to_address, subject, body):
    msg = MIMEText(body)
    msg["Subject"] = subject
    msg["From"] = user.inbox_address
    msg["To"] = to_address

    with smtplib.SMTP("smtp.reusable.email", 587) as server:
        server.starttls()
        server.login(user.smtp_user, user.smtp_pass)
        server.send_message(msg)

The recipient sees the email coming from user-12345@yourdomain.com — your domain, your branding.

5. Display in Your UI

Pull messages from IMAP (or receive via webhook) and display them in your product's interface. Your users interact with email inside your app — they never need to open Thunderbird or Outlook, though they could if they wanted to.

Cost at Scale

The per-inbox pricing is straightforward:

Users One-Time Cost Monthly Cost
10 $30 $0
100 $300 $0
1,000 $3,000 $0

For the whitelabel tier (recommended for this use case), it's $30/month flat with unlimited inbox creation. At 100+ users, the whitelabel tier is more cost-effective than individual managed inboxes.

Compare this to running your own mail server: engineering time, server costs, monitoring tools, and the ongoing ops burden. Or compare to per-seat email API services that charge $0.50-2.00 per user per month — at 1,000 users, that's $500-2,000/month instead of $30.

Considerations

Email Retention

Managed inboxes retain email for 365 days. For products that need longer retention, pull messages into your own database via IMAP and store them in your application's storage layer.

User Offboarding

When a user leaves your product, their managed inbox still exists until the retention period expires. If the inbox contains sensitive data, delete the messages via IMAP or stop routing mail to it.

Custom Domains

The whitelabel tier supports custom domains with auto-configured MX, SPF, DKIM, and DMARC. Your users' inboxes live at anything@yourdomain.com — no visible connection to Reusable.Email. See the custom domain email guide for DNS setup details.

Deliverability

Because managed inboxes use Reusable.Email's infrastructure, you benefit from their established IP reputation and properly configured authentication (SPF, DKIM, DMARC). This is one of the hardest parts of running your own mail server, and it's handled for you.

Who This Is For

This architecture works for any product where email is a feature, not the product:

  • Ticketing systems — each queue gets its own address
  • CRM platforms — each sales rep sends/receives from the product
  • Project management tools — per-project email addresses
  • Customer service software — agents communicate through the platform
  • Marketplace platforms — buyers and sellers communicate without exposing personal addresses

If email is the core of your product — if you're building the next Gmail or a dedicated temp mail service — the white-label email service guide covers the full whitelabel architecture.

Getting Started

For prototyping, create a few managed inboxes through the Reusable.Email web interface ($3 each) and integrate via IMAP/SMTP. This validates the architecture without committing to the whitelabel tier.

When you're ready for production, the whitelabel tier gives you the API, webhooks, and admin tools to manage inboxes at scale. The underlying IMAP/SMTP credentials work the same way — your integration code doesn't change.

For the full developer overview, including testing workflows and webhook integration, see Email API for Developers.