operations / SMTP Setup
No results for ""
SMTP Setup
Overview
Demyx uses ssmtp to send notification emails. Configure it in the host environment to receive alerts from healthchecks and other system events.
Configuration
Run demyx host edit and set the following:
DEMYX_SMTP=true
DEMYX_SMTP_TO=recipient@yourdomain.com
DEMYX_SMTP_FROM=demyx@yourdomain.com
DEMYX_SMTP_HOST=smtp.yourmailprovider.com
DEMYX_SMTP_PORT=587
DEMYX_SMTP_USERNAME=your@email.com
DEMYX_SMTP_PASSWORD=yourpasswordThen restart the host stack:
demyx host restartTesting
Send a test email to verify the configuration:
demyx smtpIf you receive [DEMYX] SMTP test in your inbox with "Success." as the body, SMTP is working.
Provider Examples
Gmail
DEMYX_SMTP_HOST=smtp.gmail.com
DEMYX_SMTP_PORT=587
DEMYX_SMTP_USERNAME=you@gmail.com
DEMYX_SMTP_PASSWORD=your-app-passwordUse a Gmail App Password (not your account password). Enable 2FA and generate one at Google Account → Security → App passwords.
Mailgun
DEMYX_SMTP_HOST=smtp.mailgun.org
DEMYX_SMTP_PORT=587
DEMYX_SMTP_USERNAME=postmaster@mg.yourdomain.com
DEMYX_SMTP_PASSWORD=your-mailgun-smtp-passwordSendGrid
DEMYX_SMTP_HOST=smtp.sendgrid.net
DEMYX_SMTP_PORT=587
DEMYX_SMTP_USERNAME=apikey
DEMYX_SMTP_PASSWORD=your-sendgrid-api-keyTroubleshooting
If demyx smtp fails, check:
DEMYX_SMTP=trueis set- Host was restarted after editing
- SMTP credentials are correct
- Port 587 is not blocked by your server's firewall
Related
demyx healthcheck— uses SMTP for failure alerts- Developer: Custom Callbacks — alternative alert channels (Matrix, Slack, Telegram)