Email integration lets ERPNext send invoices, notifications, and reports directly from your domain. This guide covers setting up both incoming and outgoing email.
STEP 1 Set Up Outgoing Email (SMTP)
Setup > Email Account > New
# For Gmail
Email Address: your@gmail.com
Service: Gmail
Password: App Password (not your regular password)
Enable Outgoing: Yes
Default Outgoing: Yes
SMTP Server: smtp.gmail.com
Port: 587
Use TLS: YesIMPORTANT: For Gmail, you need to generate an App Password. Go to Google Account > Security > 2-Step Verification > App Passwords.
STEP 2 Set Up Incoming Email (IMAP)
# Same email account, enable incoming
Enable Incoming: Yes
IMAP Server: imap.gmail.com
Port: 993
Use SSL: Yes
Email Sync Option: ALLSTEP 3 Custom SMTP (Recommended for Production)
# Using SendGrid
SMTP Server: smtp.sendgrid.net
Port: 587
Use TLS: Yes
Email Address: noreply@yourdomain.com
Password: Your SendGrid API Key
# Using Amazon SES
SMTP Server: email-smtp.us-east-1.amazonaws.com
Port: 587
Use TLS: Yes
Email Address: noreply@yourdomain.com
Password: Your SES SMTP credentialsSTEP 4 Configure Email Templates
Setup > Email > Email Template > New
Name: Invoice Reminder
Subject: Invoice {{ doc.name }} - Payment Reminder
Response: |
Dear {{ doc.customer_name }},
This is a reminder that invoice {{ doc.name }}
for {{ doc.grand_total }} is due on {{ doc.due_date }}.
Please process the payment at your earliest convenience.
Thank you.STEP 5 Test Your Setup
# From the terminal
cd frappe-bench
bench --site mysite.local send-notifications
# Or send a test email from the UI
Setup > Email Account > Select account > Send Test EmailTroubleshooting
# Check email queue
bench --site mysite.local show-pending-emails
# Clear stuck emails
bench --site mysite.local clear-email-queue
# Check error logs
tail -f logs/worker.error.logOnce email is configured, ERPNext will automatically send notifications for order confirmations, invoice submissions, leave approvals, and any custom workflow actions you set up.
Comments
Join the discussion. Got a question, found an issue, or want to share your experience?