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 ​

  1. Open the Email Account list, and select New.
  2. Enter the Email Address, for example sales@yourcompany.com.
  3. Select the Domain, or select the Service.
  4. Enter the Password.
  5. Select Enable Incoming, Enable Outgoing, or both. The sections below describe the options.
  6. 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 ​

OptionWhat it does
Use IMAPReads mail through IMAP. Clear it to use POP3.
Use SSLUses SSL for the incoming connection.
Attachment Limit (MB)The largest attachment that ERPNext accepts.
Default IncomingMakes this account receive replies. ERPNext uses its address as the Reply-To address.
Email Sync OptionUNSEEN syncs only unread mail. ALL syncs all mail.
Initial Sync CountHow many emails ERPNext reads the first time: 100, 250, or 500.
Append ToCreates 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 EmailsCreates a Contact for each new sender.
Enable Automatic Linking in DocumentsLinks email to a document through a unique address. Read Link emails to documents.

Outgoing options ​

OptionWhat it does
Use TLS or Use SSLThe security type of the SMTP server. SSL usually uses port 465.
PortThe SMTP port.
Disable SMTP server authenticationSends without a login, for servers that allow it.
Default OutgoingSends notifications and other system email from this account.
Always use this email address as sender addressSends all email from this account with the account's address, not the user's address.
Send unsubscribe message in emailAdds an unsubscribe link to email from this account.
Track Email StatusShows when a recipient opens the email. With many recipients, the email counts as opened when one of them opens it.
Add SignatureAdds the Signature to the end of each email.
Enable Auto ReplySends the Auto Reply Message to each incoming email.
Append Emails to Sent FolderCopies 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:

  1. Open the email account of replies@yourcompany.com.
  2. Select Enable Incoming, and then select Default Incoming.
  3. 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.

  1. Open the email account, and select Enable Incoming.
  2. 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.
  3. 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.