Skip to content
OwnSMTP
Open source · self-hosted

Your SMTP server.
One clean API.

A self-hosted HTTP API for sending email through an SMTP account you already own. Your credentials, your provider, your infrastructure.

Install with Docker
docker pull ghcr.io/samirkoirala/ownsmtp:1.1.2

Message path

Stateless
01Your backend
02OwnSMTP HTTP API
03Your SMTP provider
04Recipient

OwnSMTP submits through standard SMTP. It does not replace or resell your email provider.

Simple by design

A narrow interface for a messy integration

Keep provider-specific SMTP configuration at the edge of your infrastructure while every backend uses the same small HTTP contract.

Keep SMTP credentials out of application code
Use a consistent HTTP API
Bring your own SMTP provider
Allow-list sender domains
Deploy with Docker or Kubernetes
Stateless and self-hosted
No database required

How it works

One authenticated request

  1. 1

    Configure

    Set your SMTP host, credentials, API key, and allowed sender domains.

  2. 2

    Call

    Your backend sends an authenticated JSON request to POST /v1/emails.

  3. 3

    Submit

    OwnSMTP validates the request and hands the message to your configured SMTP server.

Send an email
curl -X POST http://127.0.0.1:8000/v1/emails \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EMAIL_API_KEY" \
  -d '{
    "recipient_email": ["customer@example.com"],
    "subject": "Welcome",
    "body": "<h1>Welcome!</h1>",
    "body_type": "html"
  }'

An HTTP 200 response means the SMTP server accepted the message. It does not guarantee final delivery or inbox placement.

Security & ownership

Your credentials never need to enter application code.

Run OwnSMTP close to your backend, keep the API private, and manage SMTP credentials in one deployment. Sender allow-listing provides a local safety boundary; your SMTP provider remains responsible for authorizing domains and accepting messages.

Read the security guide

Deployment

Container native

Use Docker Compose for a single host or Kubernetes for clustered infrastructure. OwnSMTP is stateless and needs no database.