Skip to content

Email (SMTP) โ€‹

Send HTML notifications via any SMTP server. Email supports multi-recipient delivery and per-user notifications for login and account events.

Overview โ€‹

  • ๐Ÿ“ง Universal โ€” Works with any SMTP server
  • ๐ŸŽจ HTML Templates โ€” Color-coded status bar with structured fields
  • ๐Ÿ‘ฅ Multiple Recipients โ€” Send to one or more email addresses
  • ๐Ÿ”’ Secure Transport โ€” SSL, STARTTLS, or plain connections
  • ๐Ÿ‘ค Per-User Delivery โ€” Direct emails to affected users for auth events

Configuration โ€‹

FieldDescriptionDefaultRequired
SMTP HostMail server hostnameโ€”โœ…
PortSMTP port587โŒ
SecurityNone, SSL, or STARTTLSstarttlsโŒ
UserSMTP usernameโ€”โŒ
PasswordSMTP passwordโ€”โŒ
FromSender email addressโ€”โœ…
ToRecipient email address(es)โ€”โœ…

Setup Guide โ€‹

1. Gather SMTP Details โ€‹

You'll need the following from your email provider:

  • SMTP server hostname and port
  • Authentication credentials (if required)
  • Security method (SSL, STARTTLS, or none)

2. Configure in DBackup โ€‹

  1. Go to Notifications in the sidebar
  2. Click Add Notification
  3. Select Email (SMTP)
  4. Fill in the SMTP connection details
  5. Set the sender (From) and recipient (To) addresses
  6. Click Test to send a test email
  7. Save

3. Test the Connection โ€‹

Click Test to verify the SMTP connection and send a test email. Check the recipient's inbox (and spam folder) for the test message.

Common SMTP Configurations โ€‹

Gmail
Host: smtp.gmail.com
Port: 587
Security: STARTTLS
User: your-email@gmail.com
Password: App Password (not regular password)

Generate an App Password at: Google Account โ†’ Security โ†’ 2-Step Verification โ†’ App passwords

Gmail App Passwords

Regular passwords won't work with Gmail SMTP. You must create an App Password, which requires 2-Step Verification to be enabled.

SendGrid
Host: smtp.sendgrid.net
Port: 587
Security: STARTTLS
User: apikey
Password: Your SendGrid API key (SG.xxx)
Mailgun
Host: smtp.mailgun.org
Port: 587
Security: STARTTLS
User: postmaster@your-domain.mailgun.org
Password: SMTP password from Mailgun dashboard
Amazon SES
Host: email-smtp.us-east-1.amazonaws.com
Port: 587
Security: STARTTLS
User: SMTP username (from SES console)
Password: SMTP password (from SES console)
Self-Hosted (Postfix)
Host: mail.example.com
Port: 587
Security: STARTTLS
User: (if required)
Password: (if required)
Mailtrap (Testing)
Host: sandbox.smtp.mailtrap.io
Port: 2525
Security: STARTTLS
User: Your Mailtrap username
Password: Your Mailtrap password

Email Format โ€‹

HTML emails include:

  • Colored Header Bar โ€” Green for success, red for failure, blue for info
  • Title โ€” Event type (used as email subject: [DBackup] Backup Successful)
  • Message Body โ€” Summary text
  • Fields Table โ€” Structured key-value data (job name, duration, size, etc.)
  • Footer โ€” Timestamp

The same template is used for all notification types (backup, restore, login, system events).

Multiple Recipients โ€‹

The To field supports multiple email addresses. Add recipients as tags โ€” each email is validated individually.

Per-User Notifications โ€‹

For User Login and User Created events, DBackup can send an email directly to the affected user (e.g., a login notification to the user who just logged in).

This is configured in Settings โ†’ Notifications (not in the notification channel itself). See System Notifications for details.

Security Settings โ€‹

SettingPortDescription
None25Unencrypted (not recommended)
SSL465Implicit TLS โ€” encrypted from start
STARTTLS587Upgrade to TLS after connecting (recommended)

WARNING

Always use SSL or STARTTLS in production to encrypt email credentials and content during transport.

Troubleshooting โ€‹

Connection Refused โ€‹

Connection refused to smtp server

Solutions:

  1. Verify the SMTP host and port are correct
  2. Check firewall allows outbound connections on the SMTP port
  3. Verify the SMTP server is running and accepting connections
  4. If running in Docker, ensure the container can reach the mail server

Authentication Failed โ€‹

Invalid login credentials

Solutions:

  1. Double-check username and password
  2. For Gmail, use an App Password (not your regular password)
  3. Verify the security setting matches what the server expects
  4. Some providers require enabling "Less secure apps" or SMTP access

Email Not Received โ€‹

Check:

  1. Spam/junk folder
  2. Correct "To" address
  3. Sender domain reputation
  4. SMTP server logs for delivery status
  5. SPF/DKIM/DMARC records for the sender domain

Timeout โ€‹

Connection timed out

Solutions:

  1. Verify the port is correct (common mistake: using 25 instead of 587)
  2. Check if the SMTP server is behind a firewall
  3. Try a different security setting
  4. Increase timeout if the server is slow

Best Practices โ€‹

  1. Use STARTTLS or SSL โ€” Never send credentials unencrypted
  2. Set a proper From address โ€” Use a recognizable sender like dbackup@example.com
  3. Configure SPF/DKIM โ€” Prevents emails from landing in spam
  4. Use App Passwords โ€” For Gmail and other providers that support them
  5. Test regularly โ€” SMTP credentials can expire or be rotated
  6. Don't use personal email โ€” Set up a dedicated service account

Released under the GNU General Public License. | Privacy ยท Legal Notice