Symptoms
- Emails show as "Queued" but never sent
- Invoice emails not received by customers
- Notification emails not working
- Email queue growing but not processing
- "Exception" status on emails
Step 1: Check Email Queue
# In Odoo:
# Settings → Technical → Emails → check status
# Filter by: State = Exception (failed emails)
# Filter by: State = Outgoing (queued emails)
# In database:
SELECT state, count(*) FROM mail_mail GROUP BY state;
# Expected: most should be 'sent', few 'outgoing', zero 'exception'
# Check recent failed emails:
SELECT id, subject, state, failure_reason, date
FROM mail_mail
WHERE state IN ('exception', 'outgoing')
ORDER BY date DESC LIMIT 20;Cause 1: Email Cron Not Running
# The "Email Queue Manager" cron processes the email queue.
# If it is disabled or stuck, emails pile up.
# Check cron status:
SELECT name, active, lastcall, nextcall
FROM ir_cron
WHERE name LIKE '%mail%' OR name LIKE '%Email%';
# Fix: ensure it is active
UPDATE ir_cron SET active = true
WHERE name LIKE '%Email Queue%';
# Also check: workers must be > 0 for crons to run reliably
# odoo.conf: workers = 5Cause 2: SMTP Credentials Wrong
# Test SMTP connection:
# Settings → Technical → Outgoing Mail Servers → click "Test Connection"
# If test fails:
# - Check username and password
# - Gmail: requires App Password (not regular password)
# - Office 365: may need OAuth or App Password
# - Check port: 587 (TLS) or 465 (SSL)
# Verify in odoo.conf if SMTP is configured there:
grep smtp /etc/odoo/odoo.confCause 3: SMTP Rate Limit
# Gmail: 500 emails/day (personal), 2000 (Workspace)
# Office 365: 10,000 emails/day
# SendGrid Free: 100 emails/day
# If you hit the limit:
# - Emails queue but SMTP rejects them
# - Error: "Daily sending quota exceeded"
# Fix: upgrade to a higher-volume provider
# Recommended: SendGrid Essentials ($19.95/mo for 100K/month)
# Or: Amazon SES ($0.10 per 1,000 emails)Cause 4: email_from Mismatch
# Many SMTP providers reject emails where the "from" address
# doesn't match the authenticated sender.
# Check email_from in odoo.conf:
grep email_from /etc/odoo/odoo.conf
# Must match an address you can send as:
# Gmail: [email protected]
# SendGrid: any address on your authenticated domain
# Office 365: [email protected]
# Fix: set email_from to match your SMTP account
email_from = [email protected]Cause 5: DNS Issues (SPF/DKIM)
# Emails sent but rejected by recipient servers.
# Check: are emails in the recipient's spam folder?
# Verify DNS records:
nslookup -type=TXT company.com | grep spf
nslookup -type=TXT _dmarc.company.com
# Test email deliverability:
# Send a test email to mail-tester.com and check your score
# Score should be 8+ out of 10Cause 6: Firewall Blocking SMTP Port
# Server firewall blocks outgoing port 587 or 465.
# Common on cloud providers (AWS, Azure, GCP block port 25 by default)
# Test from server:
telnet smtp.gmail.com 587
# If connection times out → port is blocked
# Fix: open outgoing port
ufw allow out 587/tcp
# Or use the cloud provider's email service insteadCause 7: Catchall Domain Not Set
# Without catchall domain, Odoo can't generate reply-to addresses.
# Replies to notification emails bounce.
# Check:
SELECT key, value FROM ir_config_parameter
WHERE key LIKE '%catchall%';
# Set catchall domain:
# Settings → Technical → Parameters → mail.catchall.domain
# Value: company.comForce Send Stuck Emails
# In Odoo Shell:
env['mail.mail'].search([('state', '=', 'outgoing')]).send()
env.cr.commit()
# Or retry failed emails:
env['mail.mail'].search([('state', '=', 'exception')]).write({'state': 'outgoing'})
env['mail.mail'].search([('state', '=', 'outgoing')]).send()
env.cr.commit()
# Clear old stuck emails:
env['mail.mail'].search([
('state', '=', 'exception'),
('date', '<', '2026-01-01'),
]).unlink()
env.cr.commit()Prevention
- Use a dedicated email service (SendGrid, SES) instead of Gmail
- Monitor email queue size with alerts
- Set up log rotation to keep Odoo logs readable
- Configure SPF, DKIM, DMARC for deliverability
- Test email flow after any SMTP configuration change
DeployMonkey
DeployMonkey monitors email delivery health. The AI agent detects stuck queues, SMTP errors, and deliverability issues — alerting you before customers notice missing emails.