Skip to main content
Email accounts enable your helpdesk to receive customer inquiries via email and send responses. Frappe Helpdesk supports multiple email providers and custom SMTP/IMAP configurations.

Supported Email Providers

Frappe Helpdesk includes pre-configured settings for popular email providers:
  • Gmail - Google’s email service
  • Outlook - Microsoft Outlook/Office 365
  • Yahoo - Yahoo Mail
  • Yandex - Yandex Mail
  • Sendgrid - Email delivery service (outgoing only)
  • SparkPost - Email delivery service (outgoing only)
  • Frappe Mail - Frappe’s email service
  • Custom - Any IMAP/SMTP server

Basic Configuration

All email accounts require these basic fields:
email_account_name
string
required
A friendly name for this email account (e.g., “Support” or “Sales”).
email_id
email
required
The email address for this account (e.g., [email protected]).
service
string
required
The email service provider. Options: GMail, Outlook, Yahoo, Yandex, Sendgrid, SparkPost, Frappe Mail, or Custom.
For Gmail, Outlook, Yahoo, and Yandex, you need:
password
password
required
App-specific password for your email account.Important: All popular providers require two-factor authentication and app-specific passwords:

Pre-configured Settings

These providers come with automatic server configuration: Gmail:
  • IMAP Server: imap.gmail.com (SSL enabled)
  • SMTP Server: smtp.gmail.com
  • SMTP Port: 587
Outlook:
  • IMAP Server: imap-mail.outlook.com (SSL enabled)
  • SMTP Server: smtp-mail.outlook.com
Yahoo:
  • IMAP Server: imap.mail.yahoo.com (SSL enabled)
  • SMTP Server: smtp.mail.yahoo.com
  • SMTP Port: 587
Yandex:
  • IMAP Server: imap.yandex.com (SSL enabled)
  • SMTP Server: smtp.yandex.com
  • SMTP Port: 587

Frappe Mail

For Frappe Mail integration:
frappe_mail_site
string
required
Your Frappe Mail site URL (e.g., https://frappemail.com).
api_key
string
required
API key from your Frappe Mail account.
api_secret
password
required
API secret from your Frappe Mail account.
Learn more about Frappe Mail.

Custom SMTP/IMAP Configuration

For custom email servers:

Basic Authentication

password
password
required
Password for authenticating with the email server.
domain
string
Email domain (e.g., example.com). Can be linked to an Email Domain doctype for reusable configuration.

Incoming Mail (IMAP/POP)

email_server
string
required
IMAP or POP server address (e.g., imap.example.com).
incoming_port
number
required
Port for incoming mail. Common values:
  • 993 (IMAP with SSL)
  • 143 (IMAP with STARTTLS)
  • 995 (POP3 with SSL)
use_ssl
boolean
default:"false"
Enable SSL/TLS for incoming mail connection.
use_starttls
boolean
default:"false"
Enable STARTTLS for incoming mail connection (use TLS after initial connection).
validate_ssl_certificate
boolean
default:"true"
Verify the SSL certificate of the incoming mail server.

Outgoing Mail (SMTP)

smtp_server
string
required
SMTP server address (e.g., smtp.example.com).
smtp_port
number
default:"587"
Port for outgoing mail. Common values:
  • 587 (SMTP with STARTTLS)
  • 465 (SMTP with SSL)
  • 25 (SMTP without encryption)
use_tls
boolean
default:"false"
Enable TLS for SMTP connection.
use_ssl_for_outgoing
boolean
default:"false"
Enable SSL for SMTP connection.
validate_ssl_certificate_for_outgoing
boolean
default:"true"
Verify the SSL certificate of the SMTP server.

Incoming/Outgoing Options

These options apply to all email account types:
enable_incoming
boolean
default:"false"
If enabled, tickets can be created from incoming emails on this account.Incoming emails are automatically appended to HD Ticket doctype.
enable_outgoing
boolean
default:"false"
If enabled, outgoing emails can be sent from this account.
default_incoming
boolean
default:"false"
If enabled, all replies to your company will come to this account.Note: Only one account can be set as default incoming.
default_outgoing
boolean
default:"false"
If enabled, all outgoing emails will be sent from this account.Note: Only one account can be set as default outgoing.

Default Configuration

All email accounts are created with these defaults:
  • email_sync_option: “ALL” (sync all emails)
  • initial_sync_count: 100 (sync last 100 emails on first sync)
  • create_contact: 1 (automatically create contacts from emails)
  • track_email_status: 1 (track delivery and read status)
  • use_imap: 1 (use IMAP instead of POP3)
  • INBOX folder is automatically configured for HD Ticket creation

Creating an Email Account

Using the API:
import frappe
from helpdesk.api.settings.email import create_email_account

# Gmail example
email_account = create_email_account({
    "email_account_name": "Support",
    "email_id": "[email protected]",
    "service": "GMail",
    "password": "your-app-password",
    "enable_incoming": True,
    "enable_outgoing": True,
    "default_incoming": True,
    "default_outgoing": True
})

# Custom server example
email_account = create_email_account({
    "email_account_name": "Sales",
    "email_id": "[email protected]",
    "service": "Custom",
    "password": "your-password",
    "email_server": "imap.company.com",
    "incoming_port": 993,
    "smtp_server": "smtp.company.com",
    "smtp_port": 587,
    "use_ssl": True,
    "use_tls": True,
    "enable_incoming": True,
    "enable_outgoing": True
})

Email Domain

For custom configurations, you can create reusable Email Domain doctypes with server settings that can be selected when configuring email accounts. This is useful for organizations with multiple email accounts on the same domain. Navigate to /desk/email-domain/new-email-domain to create an Email Domain.

Troubleshooting

  • Authentication Failed: Ensure you’re using app-specific passwords for Gmail, Outlook, Yahoo, and Yandex
  • Connection Timeout: Verify server addresses and ports are correct
  • SSL Errors: Try disabling SSL certificate validation for testing (not recommended for production)
  • Not Receiving Emails: Check that enable_incoming is enabled and INBOX folder is configured

Build docs developers (and LLMs) love