![Ringle](assets/ringle-logo.png)

# Email channel setup and inbox

## Purpose
Two pages run the email channel. Email Setup turns the channel on, sets the reply-from address, verifies that your mail provider forwards messages into Ringle, and shows provider-specific forwarding instructions. Email Inbox is where you read and manage the resulting conversations.

## Prerequisites
- Email Setup requires a role with tenant settings permission. Email Inbox is visible to every tenant member.
- Replying, escalating, or closing a conversation acts on a real customer thread; this guide is read-only.

## Steps

### Step 1

![email-channel-and-inbox, step-01](screenshots/email-channel-and-inbox/step-01.png)

**Action:** Click Email Setup under Voice & Messaging in the sidebar.

**What you should see:** The Email Channel page shows three stacked sections. Email Channel Settings has an Enable Email Channel switch, a Reply-From Address field (the demo tenant uses its verified custom domain), a read-only Inbound Address with a copy button, and a Save Settings button. Forwarding Verification takes an external address and a Start Verification button. Setup Guide has an Email Provider selector.

### Step 2

![email-channel-and-inbox, step-02](screenshots/email-channel-and-inbox/step-02.png)

**Action:** In Setup Guide, pick your email provider, for example Google Workspace.

**What you should see:** The guide expands to show the exact forward-to address (copyable) and numbered steps for that provider: sign in to the admin console, configure the forwarding rule to the Ringle address, wait for propagation, then return here and click Start Verification. Exchange Online, Google Workspace, and Gmail have written guides. Other shows a coming-soon notice.

### Step 3

![email-channel-and-inbox, step-03](screenshots/email-channel-and-inbox/step-03.png)

**Action:** Click Email Inbox under Voice & Messaging in the sidebar.

**What you should see:** The Email Conversations page opens with a status filter (Active, Closed, All; Active is the default). The left pane lists conversations by customer address with a message count, the last activity time, and a status chip. The right pane prompts you to select a conversation. The demo tenant has no email conversations, so the list shows "No email conversations yet." and the right pane reads "Select a conversation to view".

### Step 4

*Screenshot not available (the demo tenant has no email conversations to open)*

**Action:** Click a conversation in the list.

**What you should see:** The thread opens on the right. The header shows the customer address and conversation status. Active threads have Escalate and Close buttons. The message history shows inbound mail on the left and bot replies on the right (each with its subject line). A reply box at the bottom lets you send a manual response.

## Troubleshooting
- Saving the reply-from address fails with "Domain is not verified in Resend.": the address uses a domain that has not completed verification. Verify it first on Message Templates, Domains tab, or leave the field empty to use the default inbound address.
- A forwarding verification never completes: the verification email must actually be forwarded by your provider to the inbound address. Re-check the forwarding rule against the Setup Guide steps, then use Resend on the expired card to start over. Pending verifications expire.
- The conversation list shows "0 messages" on threads that clearly contain messages: a known display gap in the list; open the thread to see the real history. (Not visible in this capture, which was taken on a tenant with an empty inbox.)
- You can see Email Inbox but Escalate, Close, or replying fails: the inbox is visible to read-only roles, but acting on conversations still requires the appropriate tenant permission.

## Notes
- Routes: `/settings/email-channel` (sidebar "Email Setup") and `/settings/email-conversations` (sidebar "Email Inbox"), both under Voice & Messaging. Source: `pages/settings/EmailChannelSettingsPage.jsx` (which renders `components/tenant-management/EmailChannelManagement.jsx`) and `pages/settings/EmailConversationsPage.jsx`.
- Email Setup is gated by the `tenants.settings.manage` permission. Email Inbox has no sidebar permission gate, so it is the one Voice & Messaging item that read-only roles also see.
- Forwarding verifications render as cards in one of three states: pending (with the forward-to instructions and an expiry), expired (with a Resend button), and verified (green, with the timestamp). The demo tenant had none in flight at capture time, so the states are described rather than shown.
- Captures were taken in the Demo Auto Shop tenant, which has an empty inbox, so the inbox step shows the empty state and the thread step is described rather than shown. The inbound and reply-from address (`demo-autoshop@rexeiko.resend.app`) is the demo tenant's own default address. No replies were sent and no conversations were escalated or closed.
