Set up an email domain ​

An email domain stores the mail server settings for one domain, for example yourcompany.com. Every email account on that domain takes its server settings from the email domain. You set the servers once, and add as many accounts as you need.

TIP

If you use Gmail, Outlook.com, Yahoo Mail, SendGrid, SparkPost, Yandex.Mail, or Frappe Mail, skip this page. Select the Service in the email account instead.

Prerequisites ​

  • The System Manager role.
  • The server settings from your mail provider or IT team: the incoming server, the outgoing (SMTP) server, the ports, and the security type (SSL or TLS). These are the same settings that a mail client such as Outlook asks for.

Create the email domain ​

  1. Open the Email Domain list, and select New.
  2. In Domain Name, enter your domain, for example yourcompany.com. If you open your mailbox at mail.yourcompany.com, the domain is yourcompany.com.
  3. Enter the incoming settings:
    • Incoming Server: for example imap.yourcompany.com.
    • Use IMAP: select it if the server supports IMAP. Clear it to use POP3.
    • Use SSL: select it if the incoming server uses SSL. Otherwise, select Use STARTTLS if the server supports it.
    • Port: the incoming port, if it is not the standard one.
    • Attachment Limit (MB): the largest attachment that ERPNext accepts.
  4. Enter the outgoing settings:
    • Outgoing Server: for example smtp.yourcompany.com.
    • Use TLS or Use SSL: select the security type that the SMTP server uses. SSL usually uses port 465.
    • Port: the SMTP port, for example 587 or 465.
  5. If your server does not copy sent mail to the Sent folder, select Append Emails to Sent Folder, and enter the Sent Folder Name. Servers such as Zimbra and cPanel often need this.
  6. Select Save.

ERPNext tests the connection when you save. This can take a few seconds. When the save succeeds, the domain appears in the Domain field of the email account.

Troubleshooting ​

If the save fails, check each server name, port, and security option with your mail provider. Read Troubleshoot email for common errors.