Email Architecture in Odoo
Odoo uses two email channels: Outgoing (SMTP — sending emails) and Incoming (IMAP/POP3 or catchall — receiving emails and routing to records). Both need proper configuration for features like sending invoices, receiving leads via email, and chatter notifications.
Outgoing Email (SMTP)
Settings → Technical → Outgoing Mail Servers
# Gmail SMTP
Server: smtp.gmail.com
Port: 587
Security: TLS (STARTTLS)
Username: [email protected]
Password: App Password (not regular password)
# Office 365
Server: smtp.office365.com
Port: 587
Security: TLS (STARTTLS)
Username: [email protected]
Password: App Password
# Amazon SES
Server: email-smtp.us-east-1.amazonaws.com
Port: 587
Security: TLS (STARTTLS)
Username: SMTP Access Key
Password: SMTP Secret Key
# Custom SMTP (Postfix, Mailcow, etc.)
Server: mail.company.com
Port: 587
Security: TLS
Username: [email protected]
Password: passwordGmail App Password Setup
- Enable 2-Factor Authentication on your Google account
- Go to Google Account → Security → App Passwords
- Generate a new app password for "Mail" on "Other (Odoo)"
- Use this 16-character password in Odoo SMTP settings
Incoming Email
Settings → Technical → Incoming Mail Servers
# IMAP Configuration
Server: imap.gmail.com
Port: 993
Security: SSL/TLS
Username: [email protected]
Password: App PasswordEmail Aliases
Email aliases route incoming emails to specific Odoo objects:
[email protected]→ Creates leads in CRM[email protected]→ Creates helpdesk tickets[email protected]→ Creates job applications
Catchall Domain
Settings → Technical → Parameters → mail.catchall.domain
Set to your domain (e.g., company.com). Odoo generates reply-to addresses like [email protected] that route replies back to the correct record.
DNS Records
For reliable email delivery, configure these DNS records:
# SPF — Authorize your SMTP server to send email
TXT @ "v=spf1 include:_spf.google.com include:amazonses.com ~all"
# DKIM — Sign emails cryptographically
TXT google._domainkey "v=DKIM1; k=rsa; p=..."
# DMARC — Policy for failed SPF/DKIM
TXT _dmarc "v=DMARC1; p=quarantine; rua=mailto:[email protected]"
# MX — Where to receive email
MX @ mail.company.com (priority 10)Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| Emails not sending | Wrong SMTP credentials | Click "Test Connection" in outgoing mail server. Check username and app password. |
| Emails in spam | Missing SPF/DKIM/DMARC | Configure DNS records. Use mail-tester.com to check score. |
| "Connection refused" | Port blocked by firewall | Open port 587 outbound. Try port 465 with SSL instead. |
| "Authentication failed" | Using regular password | Gmail requires App Password with 2FA enabled. Office 365 may need OAuth. |
| Replies not threading | Missing catchall domain | Set mail.catchall.domain in system parameters. |
| Duplicate emails | Multiple outgoing servers | Keep only one active outgoing mail server. Deactivate others. |
| Emails queued but not sent | Email cron not running | Check Settings → Technical → Scheduled Actions → "Email Queue Manager" is active. |
| "Daily limit reached" | SMTP provider rate limit | Gmail: 500/day. SES: depends on account. Use dedicated SMTP for production. |
Production Recommendations
- Use a dedicated email service (Amazon SES, Mailgun, SendGrid) — not Gmail — for production
- Configure SPF, DKIM, and DMARC for email deliverability
- Set
email_fromin odoo.conf to a valid noreply address - Monitor the email queue: Settings → Technical → Emails → check for "Exception" status
DeployMonkey
DeployMonkey configures outgoing email automatically during instance setup. The AI agent diagnoses email delivery issues, checks DNS records, and identifies why emails land in spam.