nginx-mailer

nginx-mailer

Docker app from geiserx's Repository

Overview

Lightweight nginx-based container (~35MB) for serving static websites with an integrated contact form that sends emails via SMTP. Single container runs both nginx and a Go API backend via supervisord. Includes optional Cloudflare Turnstile CAPTCHA integration.

Multi-arch (amd64/arm64). Perfect for personal or portfolio sites that need a simple contact form without a full backend.

More info: https://github.com/GeiserX/nginx-mailer

nginx-mailer banner

nginx-mailer

CI License Docker Pulls

Docker image based on nginx:alpine that serves a static site and sends its contact form by SMTP, with optional Cloudflare Turnstile.


Features

  • Serves a static site from a mounted folder with nginx on port 80.
  • Contact form endpoint POST /api/contact that emails each submission to one address.
  • SMTP over TLS (port 465) or STARTTLS (other ports).
  • Optional Cloudflare Turnstile CAPTCHA check.
  • One container: nginx and the Go mail service run under supervisord.
  • linux/amd64 image on Docker Hub.

Quick start

docker run -d \
  -p 80:80 \
  -v /path/to/site:/usr/share/nginx/html:ro \
  -e SMTP_HOST=smtp.example.com \
  -e SMTP_PORT=465 \
  -e SMTP_USER=noreply@example.com \
  -e SMTP_PASSWORD=your-password \
  -e SMTP_FROM=noreply@example.com \
  -e CONTACT_EMAIL=you@example.com \
  drumsergio/nginx-mailer:1.0.0

The site is served on port 80, with /api/contact and /health behind nginx. Compose and every variable are in Getting started.

Documentation

License

GPL-3.0-or-later

Download Statistics

3,534
Total Downloads

Related apps

Explore more like this

Explore all

Details

Repository
drumsergio/nginx-mailer:latest
Last Updated2026-08-24
First Seen2026-04-06

Runtime arguments

Web UI
http://[IP]:[PORT:80]/
Network
bridge
Privileged
false

Template configuration

HTTP PortPorttcp

HTTP port for the website

Target
80
Default
8080
Website FilesPathro

Static website files (read-only)

Target
/usr/share/nginx/html
Default
/mnt/user/appdata/nginx-mailer/html
SMTP HostVariable

SMTP server hostname

Target
SMTP_HOST
SMTP PortVariable

SMTP port (465 for SSL, 587 for STARTTLS)

Target
SMTP_PORT
Default
465
SMTP UserVariable

SMTP username

Target
SMTP_USER
SMTP PasswordVariable

SMTP password

Target
SMTP_PASSWORD
From EmailVariable

Sender email address

Target
SMTP_FROM
Contact EmailVariable

Recipient email for contact form submissions

Target
CONTACT_EMAIL
Turnstile SecretVariable

Cloudflare Turnstile CAPTCHA secret key (optional)

Target
CLOUDFLARE_TURNSTILE_SECRET_KEY