Smail is a secure and configurable PHP email microservice.
158
Smail is a secure and configurable PHP email microservice designed to serve as the backend for contact forms on static websites (HTML/CSS/JS, VueJS, React, etc.). With a single implementation, it can support multiple websites without the need for a full backend.
This service was built with a focus on security, flexibility, and ease of implementation.
.env file or Docker environment variables.docker-compose.yml and paste the following content. Make sure to use the latest image version (or download it from the repository - https://github.com/delcioPHP/smail-service).version: '3.8'
services:
smail-service:
image: cabanga/smail-service:1.0.0
container_name: smail-service
ports:
- "8080:80"
restart: unless-stopped
environment:
# SERVICE
- ALLOWED_ORIGINS=http://localhost:3000,http://yourdomain.ao
- API_ROUTE=/api/contact
- LOG_PATH=/var/www/html/logs/
- DEFAULT_LANG=pt
- API_SECRET_KEY=chave_super_secreta
# SMTP
- SMTP_HOST=smtp.yourdomain.ao
- SMTP_PORT=465
- [email protected]
- SMTP_PASSWORD=SuaSenhaSuperSegura
- SMTP_SECURE=ssl
# E-mail
- [email protected]
- EMAIL_FROM_NAME="Contacto do Site"
- [email protected]
- EMAIL_SUBJECT="Novo Contacto do Website"
# SECURITY
- RECAPTCHA_ENABLED=false
- RECAPTCHA_SECRET_KEY=''
- RECAPTCHA_V3_THRESHOLD='0.5'
- RECAPTCHA_URL='https://www.google.com/recaptcha/api/siteverify'
Edit Environment Variables: Adjust the values in the environment: section to match your SMTP credentials, allowed domains, etc.
Start the Service: In the same folder where you saved the file, run:
docker-compose up -d
Content type
Image
Digest
sha256:7aa821be5…
Size
196.3 MB
Last updated
about 1 year ago
docker pull cabanga/smail-service:1.0.0