Skip to content

Repository files navigation

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

Releases

Sponsor this project

Packages

Used by

Contributors

Languages