📧 Email SMTP Notification Configuration Guide¶
QuantDinger supports strategy signal notifications via email, ideal for users who need detailed notification records.
📋 Table of Contents¶
- Prerequisites
- Supported Email Providers
- Configuration Steps
- Step 1: Obtain SMTP Service Information
- Step 2: Configure Environment Variables
- Step 3: Enable Email Notifications in Strategy
- Provider Configuration Examples
- Troubleshooting
Prerequisites¶
- An email account with SMTP sending capability
- SMTP service enabled (some providers require manual activation)
- App password or authorization code (not your login password)
- QuantDinger backend service deployed and running
Supported Email Providers¶
QuantDinger supports any standard SMTP protocol email provider, including:
| Provider | SMTP Server | Port | Encryption |
|---|---|---|---|
| Gmail | smtp.gmail.com | 587 (TLS) / 465 (SSL) | TLS / SSL |
| Outlook/Hotmail | smtp.office365.com | 587 | TLS |
| Yahoo Mail | smtp.mail.yahoo.com | 587 | TLS |
| SendGrid | smtp.sendgrid.net | 587 | TLS |
| Mailgun | smtp.mailgun.org | 587 | TLS |
| Amazon SES | email-smtp.{region}.amazonaws.com | 587 | TLS |
| Zoho Mail | smtp.zoho.com | 587 | TLS |
| ProtonMail Bridge | 127.0.0.1 | 1025 | STARTTLS |
Configuration Steps¶
Step 1: Obtain SMTP Service Information¶
For Gmail:
- Visit Google Account Security Settings
- Enable 2-Step Verification
- Generate an "App Password"
- Select "Mail" and your device type to get a 16-character password
For Outlook/Hotmail:
- Use your regular email and password
- Ensure "SMTP AUTH" is enabled in account settings
- May require app password if 2FA is enabled
⚠️ Important: App passwords are different from your login password. Keep them secure.
Step 2: Configure Environment Variables¶
Add SMTP parameters to your backend_api_python/.env file:
# =========================
# Email / SMTP Configuration
# =========================
# SMTP server address (required)
SMTP_HOST=smtp.gmail.com
# SMTP port (required)
# Common ports: 587 (TLS) / 465 (SSL) / 25 (unencrypted, not recommended)
SMTP_PORT=587
# SMTP username (required, usually your email address)
SMTP_USER=your_email@gmail.com
# SMTP password or app password (required)
SMTP_PASSWORD=your_app_password
# Sender address (optional, defaults to SMTP_USER)
SMTP_FROM=your_email@gmail.com
# Enable STARTTLS (typically true for port 587)
SMTP_USE_TLS=true
# Enable implicit SSL (typically true for port 465)
SMTP_USE_SSL=false
Restart the backend service after configuration to apply changes.
Step 3: Enable Email Notifications in Strategy¶
In the strategy configuration page under "Signal Notifications":
- Enable the Email notification channel
- Enter the recipient email address in the designated field
💡 Tip: You can enter multiple email addresses (comma-separated) for multi-recipient notifications.
Provider Configuration Examples¶
Gmail¶
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASSWORD=your_app_password # 16-character app password
SMTP_FROM=your_email@gmail.com
SMTP_USE_TLS=true
SMTP_USE_SSL=false
Outlook / Office 365¶
SMTP_HOST=smtp.office365.com
SMTP_PORT=587
SMTP_USER=your_email@outlook.com
SMTP_PASSWORD=your_password
SMTP_FROM=your_email@outlook.com
SMTP_USE_TLS=true
SMTP_USE_SSL=false
Yahoo Mail¶
SMTP_HOST=smtp.mail.yahoo.com
SMTP_PORT=587
SMTP_USER=your_email@yahoo.com
SMTP_PASSWORD=your_app_password
SMTP_FROM=your_email@yahoo.com
SMTP_USE_TLS=true
SMTP_USE_SSL=false
SendGrid¶
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USER=apikey
SMTP_PASSWORD=SG.xxxxxxxxxxxxxxxxxxxxx # Your API Key
SMTP_FROM=verified_sender@yourdomain.com
SMTP_USE_TLS=true
SMTP_USE_SSL=false
Mailgun¶
SMTP_HOST=smtp.mailgun.org
SMTP_PORT=587
SMTP_USER=postmaster@your-domain.mailgun.org
SMTP_PASSWORD=your_mailgun_smtp_password
SMTP_FROM=noreply@yourdomain.com
SMTP_USE_TLS=true
SMTP_USE_SSL=false
Amazon SES¶
SMTP_HOST=email-smtp.us-east-1.amazonaws.com # Replace with your region
SMTP_PORT=587
SMTP_USER=AKIAIOSFODNN7EXAMPLE # SMTP credential username
SMTP_PASSWORD=your_smtp_password # SMTP credential password
SMTP_FROM=verified@yourdomain.com
SMTP_USE_TLS=true
SMTP_USE_SSL=false
Zoho Mail¶
SMTP_HOST=smtp.zoho.com
SMTP_PORT=587
SMTP_USER=your_email@zoho.com
SMTP_PASSWORD=your_password
SMTP_FROM=your_email@zoho.com
SMTP_USE_TLS=true
SMTP_USE_SSL=false
Troubleshooting¶
Q: Authentication error?¶
- Verify username and password (app password) are correct
- Confirm SMTP service is enabled in your email settings
- Some providers require app passwords instead of login passwords
- Check if "Less secure app access" needs to be enabled (legacy option)
Q: Connection timeout?¶
- Verify SMTP server address and port are correct
- Check if server firewall allows the port
- If using a proxy, ensure proxy configuration is correct
- Some networks block SMTP ports; try port 587 or 465
Q: How to choose between TLS and SSL?¶
| Port | Encryption | Configuration |
|---|---|---|
| 587 | STARTTLS | SMTP_USE_TLS=true, SMTP_USE_SSL=false |
| 465 | Implicit SSL | SMTP_USE_TLS=false, SMTP_USE_SSL=true |
| 25 | None | SMTP_USE_TLS=false, SMTP_USE_SSL=false (not recommended) |
Q: Emails marked as spam?¶
- Use a
SMTP_FROMaddress matching yourSMTP_USER - Consider professional email services (SendGrid, Mailgun, Amazon SES)
- Configure SPF, DKIM, DMARC records for your domain (business email)
- Avoid spam trigger words in subject/content
Q: Does it support HTML emails?¶
Yes, QuantDinger automatically sends formatted HTML emails with a plain text fallback for maximum compatibility.
Q: Rate limits?¶
Most providers have sending limits: - Gmail: ~500/day (personal), 2000/day (Workspace) - Outlook: ~300/day - SendGrid: Based on your plan
For high-volume notifications, consider dedicated email services.
