# Nginx Mailer

Nginx Mailer is a lightweight Docker container that serves static websites and sends contact-form submissions to an email address via Simple Mail Transfer Protocol (SMTP), with optional Cloudflare Turnstile protection. It is open source and self-hosted, installable on Docker Hub and Unraid.

Canonical page: https://ourlocalhost.com/app/2304/nginx-mailer

## Description

Nginx Mailer is a lightweight Docker container that serves static websites and sends contact-form submissions to an email address via Simple Mail Transfer Protocol (SMTP), with optional Cloudflare Turnstile protection for personal or portfolio sites that need a simple contact form without a full backend.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

56/100 (Fair), based on 3 of 4 factors.
- Maintained: 95 (last commit 31 days ago)
- Popular: 10 (2 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)

## Links

- Docker Hub: https://hub.docker.com/r/drumsergio/nginx-mailer
- GitHub: https://github.com/GeiserX/nginx-mailer
- Unraid: https://ca.unraid.net/apps/nginx-mailer-09dsln81oh1ogw?q=nginx-mailer

## Common questions

### How do I provide the static website files?

Mount your site folder to /usr/share/nginx/html, for example read-only with -v /path/to/site:/usr/share/nginx/html:ro. nginx serves that folder on port 80.

### Which port should I publish for the site and contact form?

Expose container port 80 to a host port, such as -p 80:80. The static site, /api/contact, and /health are all served through nginx.

### Which SMTP environment variables do I need to set?

Set SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_FROM, and CONTACT_EMAIL. Use port 465 for SMTP over TLS or another port for STARTTLS.

### Can I use Cloudflare Turnstile for CAPTCHA?

Yes, the container includes optional Cloudflare Turnstile CAPTCHA integration for the contact form.

## Alternatives

- Apache HTTP Server: Open-source HTTP server offering cross-platform support, modular architecture, secure configuration, robust content delivery, and extensive…
- BunkerWeb: BunkerWeb is a self-hosted, open-source web application firewall and NGINX-based web server that protects services with secure-by-default s…
- Caddy: Caddy is an extensible web server and reverse proxy that serves Transport Layer Security (TLS) by default, making it simple to secure and r…
- Corvus: Self-hosted reverse proxy and web application firewall with a web console; it provides domain forwarding, free SSL, live traffic monitoring…
- Haproxy: HAProxy is a TCP proxy and a HTTP reverse proxy.
- Microsoft IIS: Internet Information Services (IIS) for Windows® Server is a flexible, secure and easy-to-manage Web server for hosting anything on the Web.
- Træfik Proxy: The Cloud Native Application Proxy Simplify networking complexity while designing, deploying, and operating applications.
- Varnish: Varnish is an open-source HyperText Transfer Protocol (HTTP) accelerator for website operators that serves cached pages from memory in fron…
- lighttpd: Lighttpd is a secure, lightweight web server that uses memory and CPU more efficiently than comparable servers, with FastCGI, CGI, authenti…
- nginx: Nginx is an HTTP web server, reverse proxy, content cache, load balancer, TCP/UDP proxy, and mail proxy server.
- nginx-ui

---
Source: Our Local Host (https://ourlocalhost.com/app/2304/nginx-mailer), the self-hosted and open-source app directory.
