Odoo Email Configuration

🇹🇭 ภาษาไทย

การตั้งค่าอีเมลใน Odoo มี 2 ส่วนหลัก: ส่งออก (Outgoing SMTP) และ รับเข้า (Incoming IMAP) และมี option พิเศษ Custom Email Servers สำหรับใช้ mail server ของตัวเองแทน server ของ Odoo


ขั้นตอนที่ 0 — เปิด Developer Mode

ก่อนตั้งค่าอีเมล ต้องเปิด Developer Mode ก่อน:

Settings → (scroll ลงล่าง) → Activate the developer mode

จากนั้นถึงจะเห็นเมนู Settings → Technical → Email


เปิดใช้งาน Custom Email Servers

Path: Settings → General Settings → Discuss

☑ Use Custom Email Servers

เมื่อเปิดแล้ว Odoo จะ หยุดใช้ mail server ของตัวเอง และใช้ server ที่กำหนดแทนทั้งหมด

⚠️ ใน Odoo Online (SaaS) ถ้าไม่เปิด option นี้ Odoo จะส่งจาก @mail.odoo.com เสมอ


Outgoing Mail Server (ส่งอีเมลออก)

Path: Settings → Technical → Email → Outgoing Mail Servers → New

Fieldคำอธิบาย
Nameชื่อ server เช่น “Company SMTP”
Priorityตัวเลขน้อย = ใช้ก่อน (default: 10)
SMTP Serverhostname ของ mail server
SMTP Port25 / 465 / 587
Connection SecurityNone / STARTTLS / SSL/TLS
Usernameอีเมล หรือ SMTP username
Passwordpassword หรือ App Token
From Filterจำกัดว่า server นี้ส่งได้เฉพาะ domain อะไร

ค่าสำหรับ Provider หลัก

ProviderSMTP ServerPortSecurity
Gmailsmtp.gmail.com587STARTTLS
Microsoft 365smtp.office365.com587STARTTLS
Outlook.comsmtp-mail.outlook.com587STARTTLS
SendGridsmtp.sendgrid.net587STARTTLS

Gmail: ต้องสร้าง App Password → Google Account → Security → 2-Step Verification → App passwords (ต้องเปิด 2FA ก่อน)

Microsoft 365: ต้องเปิด SMTP AUTH → Exchange Admin Center → Users → [user] → Mail → Manage email apps → ✅ Authenticated SMTP

หลังบันทึก → คลิก Test Connection → ✅ = เชื่อมสำเร็จ


From Filter — กรณีมีหลาย SMTP

ถ้ามีหลาย domain หรือ multi-company ใช้ From Filter เพื่อให้ Odoo เลือก server อัตโนมัติ:

Server 1: smtp.company-a.com  →  From Filter: company-a.com
Server 2: smtp.company-b.com  →  From Filter: company-b.com

Odoo จับคู่ From address กับ From Filter และเลือก server ที่ถูกต้องให้เอง


Incoming Mail Server (รับอีเมลเข้า)

ใช้สำหรับ: รับ reply เข้า ticket / สร้าง lead จากอีเมล / รับ vendor bill

Path: Settings → Technical → Email → Incoming Mail Servers → New

Fieldค่า
Server TypeIMAP (แนะนำ) หรือ POP3
Serverimap.gmail.com / outlook.office365.com
Port993 (IMAP+SSL)
SSL/TLS✅ เปิด
Username / Passwordอีเมลและ App Password
Actionsเลือกว่ารับแล้วจะทำอะไร (สร้าง ticket / lead)

Fetch interval: ดึงอีเมลทุกกี่นาที (default 5 นาที)


Email Alias — สร้างข้อมูลอัตโนมัติจากอีเมล

แต่ละ module มี alias ของตัวเอง:

ModuleAlias ตัวอย่างสร้างอะไร
Helpdesk[email protected]Ticket อัตโนมัติ
CRM[email protected]Lead อัตโนมัติ
Accounting[email protected]Vendor Bill
Recruitment[email protected]Application

ตั้ง Alias Domain:

Settings → General Settings → Discuss → Alias Domain
→ ใส่ yourdomain.com

DNS ของ domain ต้องมี MX record ชี้มาที่ Odoo server ด้วย


DNS Records — ป้องกัน Email ตก Spam

SPF Record

TXT @  "v=spf1 include:_spf.odoo.com mx ip4:YOUR_SERVER_IP ~all"

DKIM Record

Key ได้จาก Settings → Technical → Email → DKIM Keys

TXT odoo._domainkey  "v=DKIM1; p=YOUR_PUBLIC_KEY"

DMARC Record

TXT _dmarc  "v=DMARC1; p=quarantine; rua=mailto:[email protected]"

ตั้ง SPF + DKIM ก่อนเสมอ — ถ้าไม่มีอีเมลจาก Odoo จะตก Spam หรือถูก reject


กรณีพิเศษ: Odoo.sh — Mail Catcher

ใน Odoo.sh สาขา Staging / Development จะมี Mail Catcher ดักอีเมลไว้ — ไม่ส่งออกจริง:

Staging / Development branch
  → อีเมลทั้งหมด intercept ใน Mail Catcher
  → ดูได้ที่ Odoo.sh Dashboard → Mails tab

Production branch เท่านั้น → ส่งออกจริง

Troubleshooting

อาการสาเหตุที่พบบ่อย
อีเมลตก SpamSPF / DKIM ยังไม่ได้ตั้ง DNS
ส่งไม่ออกSMTP port ถูก block โดย firewall / ISP
Authentication failedGmail → ต้องใช้ App Password ไม่ใช่ password ปกติ
Microsoft 365 ส่งไม่ได้SMTP AUTH ยังไม่ได้เปิดใน Exchange Admin
อีเมลค้างใน queueScheduled Action “Email Queue Manager” ไม่ทำงาน

ดู Email Queue:

Settings → Technical → Email → Emails
→ ดู status: Sent / In Queue / Exception

  • Odoo — หน้าหลัก ERP
  • Odoo Deployment — Odoo.sh Mail Catcher, hosting options
  • Odoo Helpdesk — รับ ticket ผ่าน email alias
  • Odoo CRM — สร้าง lead จาก incoming email
  • n8n — Workflow automation ที่ trigger จาก email ได้

🇬🇧 English

Odoo email configuration has two main parts: Outgoing SMTP and Incoming IMAP, plus the Custom Email Servers option to bypass Odoo’s default mail infrastructure.


Enable Custom Email Servers

Path: Settings → General Settings → Discuss

☑ Use Custom Email Servers

Once enabled, Odoo stops using its own mail servers and uses only the servers you define.

⚠️ On Odoo Online (SaaS), without this option enabled, all emails are sent from @mail.odoo.com


Outgoing Mail Server

Path: Settings → Technical → Email → Outgoing Mail Servers → New

FieldDescription
NameServer label e.g. “Company SMTP”
PriorityLower number = used first (default: 10)
SMTP ServerHostname of your mail server
SMTP Port25 / 465 / 587
Connection SecurityNone / STARTTLS / SSL/TLS
UsernameEmail address or SMTP username
PasswordPassword or App Token
From FilterRestrict this server to a specific domain

Common Providers

ProviderSMTP ServerPortSecurity
Gmailsmtp.gmail.com587STARTTLS
Microsoft 365smtp.office365.com587STARTTLS
Outlook.comsmtp-mail.outlook.com587STARTTLS
SendGridsmtp.sendgrid.net587STARTTLS

Gmail: Generate an App Password at Google Account → Security → 2-Step Verification → App passwords (requires 2FA enabled)

Microsoft 365: Enable SMTP AUTH at Exchange Admin Center → Users → [user] → Mail → Manage email apps → ✅ Authenticated SMTP

After saving → click Test Connection → ✅ = success


From Filter — Multiple SMTP Servers

For multi-domain or multi-company setups, use From Filter so Odoo auto-selects the correct server:

Server 1: smtp.company-a.com  →  From Filter: company-a.com
Server 2: smtp.company-b.com  →  From Filter: company-b.com

Incoming Mail Server

Path: Settings → Technical → Email → Incoming Mail Servers → New

FieldValue
Server TypeIMAP (recommended) or POP3
Serverimap.gmail.com / outlook.office365.com
Port993 (IMAP+SSL)
SSL/TLS✅ Enabled
Username / PasswordEmail address and App Password
ActionsDefine what to create on receipt (ticket / lead)

Email Aliases

ModuleExample AliasCreates
Helpdesk[email protected]Ticket automatically
CRM[email protected]Lead automatically
Accounting[email protected]Vendor Bill
Recruitment[email protected]Application

Set the Alias Domain at Settings → General Settings → Discuss → Alias Domain


Required DNS Records

# SPF
TXT @         "v=spf1 include:_spf.odoo.com mx ip4:YOUR_IP ~all"
 
# DKIM (key from Settings → Technical → Email → DKIM Keys)
TXT odoo._domainkey  "v=DKIM1; p=YOUR_PUBLIC_KEY"
 
# DMARC
TXT _dmarc    "v=DMARC1; p=quarantine; rua=mailto:[email protected]"

Odoo.sh: Mail Catcher

Staging and Development branches on Odoo.sh intercept all outgoing emails in a Mail Catcher — emails never leave the platform. Only the Production branch sends real emails.


Troubleshooting

SymptomCommon Cause
Emails landing in spamSPF / DKIM DNS records not set
Cannot sendSMTP port blocked by firewall or ISP
Authentication failedGmail: must use App Password, not login password
Microsoft 365 blockedSMTP AUTH not enabled in Exchange Admin
Emails stuck in queue”Email Queue Manager” scheduled action not running

Check queue: Settings → Technical → Email → Emails → filter by status


  • Odoo — Main Odoo ERP page
  • Odoo Deployment — Odoo.sh Mail Catcher, hosting options
  • Odoo Helpdesk — Email-to-ticket via alias
  • Odoo CRM — Email-to-lead via alias
  • n8n — Workflow automation triggered from email