Set up an email account
An email account connects one mailbox to ERPNext. ERPNext uses it to send email, to receive email, or both. You need at least one outgoing account to send email, and one incoming account to receive replies.
ERPNext creates some email account templates, such as replies@example.com. They stay disabled until you enter real details.
Prerequisites
- The System Manager role.
- An email domain, unless you use Gmail, Outlook.com, Yahoo Mail, SendGrid, SparkPost, Yandex.Mail, or Frappe Mail.
- The password of the mailbox. Gmail and some other services need an app password: turn on two-step verification, and create an app password.
Create the email account
- Open the Email Account list, and select New.
- Enter the Email Address, for example
sales@yourcompany.com. - Select the Domain, or select the Service.
- Enter the Password.
- Select Enable Incoming, Enable Outgoing, or both. The sections below describe the options.
- Select Save.
ERPNext tests the connection when you save. If the details are wrong, it shows an error. Read Troubleshoot email.
Login options
- Use different Email ID: select it when the login of the mailbox differs from its address. Enter the login in Alternative Email ID. Recipients still see the Email Address as the sender.
- Awaiting password: select it when you create the account for another user and do not know the password. The user enters the password the next time they log in.
- Use ASCII encoding for password: select it if the server rejects passwords with special characters.
- Method: select OAuth to sign in through a connected app instead of a password.
Incoming options
| Option | What it does |
|---|---|
| Use IMAP | Reads mail through IMAP. Clear it to use POP3. |
| Use SSL | Uses SSL for the incoming connection. |
| Attachment Limit (MB) | The largest attachment that ERPNext accepts. |
| Default Incoming | Makes this account receive replies. ERPNext uses its address as the Reply-To address. |
| Email Sync Option | UNSEEN syncs only unread mail. ALL syncs all mail. |
| Initial Sync Count | How many emails ERPNext reads the first time: 100, 250, or 500. |
| Append To | Creates a document from each new email, for example an Issue. With IMAP, you set it for each folder in the IMAP Folder table. |
| Create Contacts from Incoming Emails | Creates a Contact for each new sender. |
| Enable Automatic Linking in Documents | Links email to a document through a unique address. Read Link emails to documents. |
Outgoing options
| Option | What it does |
|---|---|
| Use TLS or Use SSL | The security type of the SMTP server. SSL usually uses port 465. |
| Port | The SMTP port. |
| Disable SMTP server authentication | Sends without a login, for servers that allow it. |
| Default Outgoing | Sends notifications and other system email from this account. |
| Always use this email address as sender address | Sends all email from this account with the account's address, not the user's address. |
| Send unsubscribe message in email | Adds an unsubscribe link to email from this account. |
| Track Email Status | Shows when a recipient opens the email. With many recipients, the email counts as opened when one of them opens it. |
| Add Signature | Adds the Signature to the end of each email. |
| Enable Auto Reply | Sends the Auto Reply Message to each incoming email. |
| Append Emails to Sent Folder | Copies sent mail to the mailbox's Sent folder. Servers such as Zimbra and cPanel need it. |
Set the Reply-To address
ERPNext sends email from the user who sends it. It sets the Reply-To address to the Default Incoming account, so replies come back to ERPNext and attach to the right document.
To use replies@yourcompany.com as the Reply-To address:
- Open the email account of
replies@yourcompany.com. - Select Enable Incoming, and then select Default Incoming.
- Select Save.
Create documents from incoming email
An incoming account can create a document for each new email. For example, ERPNext can create an Issue for each email to support@yourcompany.com, or a Lead for each email to sales@yourcompany.com.
- Open the email account, and select Enable Incoming.
- Set the DocType:
- With Use IMAP: in the IMAP Folder table, add the folder, for example
INBOX, and select the DocType in Append To. - Without Use IMAP (POP3): select the DocType in Append To.
- With Use IMAP: in the IMAP Folder table, add the folder, for example
- Select Save.
The DocType must have Allow document creation via Email selected in Customize Form.
TIP
For a high volume of email from a self-hosted site, use an SMTP relay service, such as SendGrid. Mailbox services such as Gmail limit how many emails you can send in a day. Read Set up SendGrid.