Smail is a lightweight HTTP API for sending emails using an SMTP server. It supports HTML bodies, CC/BCC, and is ready to use with Docker. Swagger documentation is included out of the box.
- Send emails with subject and body
- Support for HTML email content
- Multiple recipients (To, CC, BCC)
- Swagger (OpenAPI) documentation
- Dockerized for easy deployment
- Create a .env file:
HTTP_PORT=8080
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_FROM=example@gmail.com
SMTP_USERNAME=example@gmail.com
SMTP_PASSWORD=aaaabbbbccccdddd- Pull the Docker image:
docker pull ghcr.io/cactusbros/smail:latest # or specific version like v0.2.2Or manually Build the image:
git clone https://github.com/CactusBros/smail.git
cd smail
docker build -t smail .- Run the container:
docker run -p 8080:8080 --env-file .env ghcr.io/cactusbros/smail:latest # or specific version like v0.2.2Or using the manually built image:
docker run -p 8080:8080 --env-file .env smail💡 Note: If your
.envfile is not in the current directory, provide the full path to it using the--env-fileflag, like:docker run -p 8080:8080 --env-file /path/to/.env smail
After running the container, access the interactive API docs at: http://127.0.0.1:8080/swagger
You can send a POST request to / using curl or tools like Postman:
curl -X POST http://localhost:8080/ \
-F 'to=someone@example.com' \
-F 'subject=Hello' \
-F 'body=This is a test email' \
-F 'is_html=false'- Add email open tracking
- Logging improvements
- Authentication or API key protection
Built with ❤️ by CactusBros