---
title: "Email AI"
description: "Set up AI-powered email customer service that automatically handles customer inquiries."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sparkcrm.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Email AI

Email AI provides AI-powered email customer service, automatically classifying customer inquiries and responding on your behalf.

**Navigation**: top navigation bar > ticket icon (tooltip "Support Tickets") for tickets; **Settings > Email AI Agent** for configuration. Both only appear once Email AI is enabled in Billing.

---

## Setting Up Email AI

Email AI requires several components to work:

1. **Enable Email AI** in billing
2. **Create an Organization** (for multi-brand support)
3. **Set up SMTP** for sending replies
4. **Connect your inbox** for receiving emails
5. **Configure AI settings** (optional)
6. **Add business context** (optional)

---

## Step 1: Enable Email AI

Email AI must be enabled in your billing settings before you can configure it.

1. Open the profile menu (your avatar in the top-right of the header) and choose **Billing**. The link is only visible to team owners, super admins, and members with the billing permission.
2. Click **Manage Services**, switch on **Email AI Agent** (this also force-enables Enhanced Shipment Tracking, which is billed separately per tracking number), then click **Save Settings**. Only the team owner, super admins, or members with the billing permission can change this.
3. Review the per-ticket pricing

---

## Step 2: Create an Organization

Organizations let you run separate Email AI configurations for different brands or products.

1. Go to **Settings > Email AI Agent** (URL: `/settings?tab=email-ai`). The entry only appears after Email AI is enabled in Billing.
2. Click **Create Organization**
3. Enter an organization name (e.g., "Support Desk" or your brand name)
4. Click **Create**

> **Note**: You can create multiple organizations to handle emails for different brands with separate inboxes and AI configurations.

### Switching Organizations

If you have multiple organizations:
1. Use the organization dropdown at the top of the Settings page
2. Select the organization you want to configure

---

## Step 3: Set Up SMTP Provider

You need an SMTP provider so Email AI can send replies to customers.

1. Go to **Settings > SMTP Profiles** in the sidebar
2. Click **Add Profile**
3. Enter your SMTP details:
- **Profile Name** - e.g., "Support Email"
- **Host Name** - Your SMTP server (e.g., `smtp.sendgrid.net`)
- **Username** / **Password** - Your SMTP credentials
- **From Email** - The address replies will come from
- **From Name** - Display name for replies
- **Reply-To Address** (optional) and **BCC Addresses** (optional)
- **Port Number** - e.g. 587 for TLS, 465 for SSL
- **Encryption** - TLS or SSL (defaults to SSL)
4. Click **Create Provider** (or **Update Provider** when editing)
5. Once the profile is saved, open its **⋯** menu and choose **Test Connection**; enter a recipient address and click **Send Test Email** — a real test message is delivered through the profile. (Testing is only available on a saved profile, not from the create form.)

### Linking SMTP to Email AI

1. Go to **Settings > Email AI Agent**
2. In the **SMTP Provider** dropdown, select the provider you created
3. Click **Save Settings**

---

## Step 4: Connect Your Inbox

Connect an email inbox so Email AI can receive and process customer emails.

1. Go to **Settings > Email AI Agent**
2. Scroll to **Email Inbox Connection**
3. Click **Add Connection**
4. Enter your IMAP details:
- **Name** - e.g., "Support Inbox"
- **Host** - Your IMAP server (e.g., `imap.gmail.com`)
- **Port** - Usually 993 for SSL
- **Encryption** - SSL recommended
- **Username** - Your email address
- **Password** - Your email password or app-specific password
5. Click **Test Connection** to verify
6. Click **Create Connection** (or **Update Connection** when editing)

### Common IMAP Settings

**Gmail:**
```
Host: imap.gmail.com
Port: 993
Encryption: SSL
```
> **Gmail Note**: You must use an App Password, not your regular password. Enable 2FA and create an app password in Google Account settings.

**Microsoft 365:**
```
Host: outlook.office365.com
Port: 993
Encryption: SSL
```

**Custom/cPanel:**
```
Host: mail.yourdomain.com
Port: 993
Encryption: SSL
```

### Syncing Emails

After connecting your inbox:
1. Open the **⋯** actions menu on your connection row and choose **Sync Now**
2. Choose a range (only UNREAD messages are ever fetched):
- **Today** - unread emails received today
- **This Week** - unread emails since the start of this calendar week
- **All Time (Lifetime)** - all unread emails since the connection was activated (may take longer)
3. Click **Start Sync**

Email AI will process incoming customer service emails and create tickets.

---

## Step 5: Configure AI Settings

Customize how the AI agent behaves.

1. Go to **Settings > Email AI Agent**
2. Configure the settings:

| Setting | Description |
|---------|-------------|
| **Agent Name** | Name the AI uses when signing emails |
| **Auto-Send Enabled** | Automatically send AI responses (vs. draft mode) |
| **Confidence Threshold** | Minimum confidence (0-1) to auto-respond |
| **Reply Delay** | Optional delay before sending replies (min/max minutes) |
| **Refund Period Days** | How many days after purchase refunds are allowed |
| **Default Refund Algorithm** | How to handle refund requests (none, immediate, return required, downsell) |

3. Click **Save Settings**

### Reply-To Email

If you want customers to reply to a different address than your SMTP sender:
1. Enter a **Reply-To Email** address
2. This must be different from your SMTP **From Email** address

---

## Step 6: Add Business Context

Help the AI understand your business by adding context documents.

1. Go to **Settings > Email AI Agent**
2. Scroll to **Business Context**
3. Click **Add Your First Context** (or **Add Context** if you already have one)
4. Enter:
- **Context Name** - e.g., "Refund Policy", "Product Info" (max 100 characters)
- **Context Information** - the information for the AI to know (max 5,000 characters)
   - leave the **Active** toggle on so the AI includes it in its prompts
5. Click **Create Context** (or **Update Context** when editing)

> You must have created an organization first — saving a context without one fails with "Please create an organization first."

### Context Examples

**Refund Policy:**
```
Our refund policy allows returns within 30 days of purchase.
Products must be unopened and in original packaging.
Refunds are processed within 5-7 business days.
```

**Product Information:**
```
Our supplement contains 60 capsules per bottle.
Take 2 capsules daily with food.
Do not use if pregnant or nursing.
```

You can add multiple context documents. The AI will use all active contexts when responding.

---

## Using Email AI

Once set up, Email AI automatically:

1. Polls your inbox for new emails
2. Classifies customer intent (refund, tracking, cancel, etc.)
3. Drafts or sends responses based on your settings

### Viewing Tickets

1. Click the ticket icon in the top navigation bar (tooltip "Support Tickets"), or go to `/email-ai/tickets`
2. See your email tickets and their status — the list defaults to the last 7 days and 25 per page; widen the date range to see older tickets.
3. Click a ticket to view details and AI analysis

### Ticket Statuses

| Status | Description |
|--------|-------------|
| **New** | Newly ingested ticket, not yet worked (shows as a blue **Open** badge in the list) |
| **In Progress** | Being handled; also carries an **Awaiting Customer** badge while a reply is waiting on the customer |
| **Escalated** | Flagged for human review |
| **Resolved** | Completed — a later customer reply reopens it (spam tickets excepted) |
| **Closed** | Terminal; closed tickets can never be reopened |

### Reviewing AI Responses

If auto-send is disabled (draft mode):
1. Open the ticket
2. Review the AI-suggested response
3. Edit if needed
4. Click **Approve & Send** on the draft (or **Send Reply** if you composed the message yourself)

---

## Troubleshooting

### Emails Not Appearing

- Verify inbox connection is active and credentials are correct
- Click **Test Connection** to verify
- Check if emails are in the inbox (not spam folder), and that the messages are still unread — only UNREAD messages are ever fetched
- Try syncing manually from the connection's **⋯** menu with **Sync Now**

### Replies Not Sending

- Verify SMTP provider is configured and linked
- Check SMTP credentials from the profile's **⋯** menu with **Test Connection**
- Ensure auto-send is enabled (or manually approve drafts)

### AI Giving Wrong Responses

- Review and update your Business Context
- Check confidence threshold settings
- Add more specific context for common questions

Source: https://docs.sparkcrm.io/email-ai/index.mdx
