# Set up your AI agent to answer email > Give your agent an email address, forward your own support mailboxes to it, and send replies from your domain **Email settings** is where you give your QwryAI agent an email address and connect your own addresses and domains, so customers can write to `support@yourstore.com` and get answers from your agent. You find it in your agent's **Settings**, on the **Email** tab. It works together with the [Email channel](/docs/user-guides/integrations/email), which decides how the agent answers, and with Helpdesk ticketing, which can reply to tickets from the same addresses. With email settings you can: * **Receive** customer emails and send AI-written replies. * **Connect your own mailboxes and domains**, so customers see replies from your address instead of the built-in `mail.qwryai.com` address. > [!NOTE] > > Each agent can have up to **3 custom domains**, and up to **20 email addresses per domain**. ## How it works * **Agent email address**: when you enable email for an agent, QwryAI creates an address like `support@yourstore.mail.qwryai.com`. It's based on your agent's name when you enable it, with a number added if that address is already taken. * **Inbound messages**: customers email your **Agent email address** directly, or one of your own addresses (for example, `support@yourstore.com`) that automatically forwards to it. * **AI response**: your agent reads the email and writes a reply. * **From address**: without a connected domain, replies come from your **Agent email address**. Once you've verified forwarding and authenticated your domain, link your address to the **Email channel** and replies come from it (for example, `support@yourstore.com`). > [!NOTE] > > To send from your own domain, you need two things: (1) automatic forwarding from your mailbox to the **Agent email address**, and (2) the DNS records QwryAI gives you, added at your DNS provider. ## Prerequisites * Access to the QwryAI dashboard and the agent you want to set up. * Admin access to your **email provider**, to set up forwarding. * Admin access to your **DNS provider** (your registrar or DNS host), to add two CNAME records and one TXT record. Your MX records stay as they are. * An address on a **company domain**. Addresses on free email providers such as Gmail, Outlook.com or Yahoo can't be added. ## Accessing Email settings **1. Open your agent's settings** Open your agent and go to **Settings › Email**. If the agent doesn't have an email address yet, select **Enable** under **Agent email address**. ![The Email tab in the agent's Settings with the Agent email address section and its Enable button.](annotated/01-email-tab.webp "Settings › Email: select Enable to create the agent email.") ![The Agent email address section showing the agent's new address on mail.qwryai.com with a copy button, above the Email configuration section.](annotated/01-email-tab--open.webp "Your agent email address, ready to copy.") **2. Find your agent email address** Your new **Agent email address** appears in the same section, for example: `support@yourstore.mail.qwryai.com` Use the copy button beside it to copy the address. ![The Agent email address section showing the agent's built-in address with a Copy to clipboard button.](annotated/02-agent-address.webp "Copy the agent email address.") You can use this address straight away to receive and answer email. ## Using the agent email directly You can try email right away by writing to your **Agent email address**: 1. Send an email from any mailbox to your **Agent email address**. 2. Your agent reads the email. 3. You get a reply from the same address. > [!NOTE] > > For your agent to reply, the **Email channel** must be turned on. See [Email channel](/docs/user-guides/integrations/email). > [!TIP] > > If a reply arrives from your **Agent email address**, the basic email setup is working. To use **your own addresses** (for example, `support@yourstore.com` or `billing@yourstore.com`), continue with the steps below. ## Step 1: Add an email address **Setup your email** walks you through four steps: your address, forwarding, domain authentication, and linking the address to where it's used. **1. Select New email** In the **Email configuration** section, select **New email**. ![The Email configuration section with the pointer on the New email button.](annotated/03-new-email.webp "Select New email to add your own address.") ![The Setup your email panel at Step 1 of 4 with the Your email address field.](annotated/03-new-email--open.webp "Setup your email opens at Step 1 of 4.") **2. Enter your email address** Under **Your email address**, type the address customers write to (for example, `support@yourstore.com`). The preview beside it shows how your replies will look. The domain is taken from the address automatically. ![The Your email address field filled in with support@yourstore.com and a preview of an email sent from that address.](annotated/04-enter-address.webp "Enter the address customers write to, then Continue.") > [!NOTE] > > A domain can only be connected to one QwryAI workspace. You can add up to **3 domains** per agent and **20 addresses per domain**. **3. Continue to forwarding** Select **Continue** to move to the forwarding step. ## Step 2: Configure email forwarding Next, set up automatic forwarding at your email provider, so mail sent to your support address reaches your agent. ### Forwarding flow 1. A customer emails `support@yourstore.com`. 2. Your email provider forwards it automatically to your **Agent email address**. 3. Your agent reads the email and writes a reply. 4. The reply goes out from your address once your domain is authenticated. ### Set up forwarding in your email provider Step 2 of **Setup your email** shows your **Agent email address** with a copy button, under **Copy your Agent email address to your email provider's settings**. The steps at your provider vary, but usually look like this: 1. Sign in to your email provider's admin or mailbox settings. 2. Open the **Forwarding**, **Rules** or **Filters** settings. 3. Create a rule that forwards incoming mail from your support mailbox to your **Agent email address**. 4. If your provider asks you to confirm the forwarding address, it sends a confirmation email to your **Agent email address**. You'll find it in your agent's conversations while the Email channel is on, or in the **Helpdesk inbox** otherwise. The panel links straight to the right place. 5. Back in **Setup your email**, select **Verify automatic forwarding**. QwryAI sends a test message to your address and checks for a few seconds that it came back through your forwarding rule. When it does, you move on to Step 3. If not, the panel shows *We were unable to send a test message to confirm your setup. Please check your settings in your email provider then try again.* > [!TIP] > > If your domain isn't authenticated yet, you can go straight to Step 3 with the arrow button beside **Setup your email** and come back to verify forwarding later. ## Provider-specific forwarding guides For exact steps, follow your email provider's own guide. ### Google Workspace and Gmail > [!TIP] > > **Recommended:** use **Default routing** in the Google Workspace Admin Console. It has no rate limits and doesn't need a mailbox for the address you forward. #### Forward with Default routing in Google Workspace (recommended) > [!NOTE] > > You need **Google Workspace administrator** access for these steps. **1. Open the Google Admin Console** Sign in to the [Admin Console](https://admin.google.com/) with an admin account. **2. Open Gmail routing** Go to **Apps › Google Workspace › Gmail**, find **Default routing**, and select **Configure** (or **Add another rule**). **3. Create a rule for your support address** * Set **Envelope recipient** to the address customers use, for example `support@yourstore.com`. * Choose **Change envelope recipient**. * In **Replace recipient**, enter your QwryAI **Agent email address**. **4. Apply it to recognized and unrecognized addresses** Before saving, choose **Perform this action on non-recognized and recognized addresses**, then save. **5. Verify forwarding in QwryAI** Go back to **Setup your email** and select **Verify automatic forwarding**. > [!NOTE] > > Routing changes can take up to **24 hours** to apply, though they usually work much sooner. #### Forward from a personal Gmail inbox * [Automatically forward Gmail messages](https://support.google.com/mail/answer/10957) #### Stop forwarded emails from going to spam Gmail doesn't forward messages it marks as spam, so some customer emails might never reach your agent. A filter that keeps every message out of spam fixes this. **1. Open Gmail's filter settings** Select the **gear icon › See all settings**, then open **Filters and Blocked Addresses**. **2. Create a filter that matches every email** Select **Create a new filter**, set **Size** to **less than** `200` **MB**, then select **Create filter**. **3. Never send matching emails to spam** Tick **Never send it to Spam**, then select **Create filter**. ### Microsoft * **Outlook**: [Turn on automatic forwarding in Outlook](https://support.microsoft.com/en-us/office/turn-on-automatic-forwarding-in-outlook-7f2670a1-7fff-4475-8a3c-5822d63b0c8e). This covers Outlook.com, new and classic Outlook, and Outlook on the web. #### Allow external forwarding in Microsoft 365 (work accounts) Microsoft 365 blocks mail from being forwarded outside your organization by default. Without this change, forwarding looks set up in Outlook but the messages never arrive, and verification fails. See [Microsoft's guide to external forwarding](https://learn.microsoft.com/en-us/defender-office-365/outbound-spam-policies-external-email-forwarding). > [!NOTE] > > You need **Microsoft 365 administrator** access. If you aren't an admin, send these steps to your IT team. **1. Turn on forwarding in the outbound spam policy** Sign in to the [Microsoft Defender portal](https://security.microsoft.com) and go to **Email & collaboration › Policies & rules › Threat policies › Anti-spam**. Open the outbound spam filter policy that applies to your users, select **Edit protection settings**, set **Automatic forwarding rules** to **On - Forwarding is enabled**, and save. > [!NOTE] > > To avoid turning on forwarding for everyone, create a custom outbound policy for just the users or groups that forward to QwryAI. **2. Verify forwarding in QwryAI** Go back to **Setup your email** and select **Verify automatic forwarding**. ### Other email providers * **Yahoo Mail**: [Automatically forward emails in Yahoo Mail](https://help.yahoo.com/kb/SLN22028.html) * **Proton Mail**: [Set up email forwarding in Proton Mail](https://proton.me/support/email-forwarding) ## Step 3: Authenticate your domain with DNS **Authenticate your domain** lets QwryAI send email on your behalf from your own domain. ### View your DNS records Under **Domain records**, Step 3 lists the records to add, each with its **Name** and **Value** and a copy button. **Copy all codes** copies every record at once. The records are: * a **CNAME** for DKIM signing, named like `qwry._domainkey.yourstore.com`; * a **CNAME** for the return path, named like `qwry-bounce.yourstore.com`; * a **TXT** record for DMARC, named `_dmarc.yourstore.com`, with the value `v=DMARC1; p=none`. Copy each record exactly as shown in your own panel. ### Add records at your DNS provider 1. Sign in to the DNS provider that manages your domain (your registrar or a DNS host such as Cloudflare). 2. Find its DNS settings. 3. Add each record with the **Name** and **Value** from QwryAI. 4. Back in QwryAI, select **Validate**. > [!NOTE] > > The DKIM and return-path records are what let an address send. DMARC is optional and doesn't block sending. Your MX records stay as they are. ### Provider-specific DNS guides #### Domain registrars * **GoDaddy**: [Add a CNAME record](https://www.godaddy.com/en/help/add-a-cname-record-19236) * **Namecheap**: [How to create a CNAME record](https://www.namecheap.com/support/knowledgebase/article.aspx/9646/2237/how-to-create-a-cname-record-for-your-domain/) #### DNS hosting providers * **Cloudflare**: [Create DNS records](https://developers.cloudflare.com/dns/manage-dns-records/how-to/create-dns-records/) * **Amazon Route 53**: [Working with records](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-creating.html) * **Google Cloud DNS**: [Manage records](https://cloud.google.com/dns/docs/records) * **Azure DNS**: [Manage DNS record sets](https://learn.microsoft.com/en-us/azure/dns/dns-operations-recordsets-portal) ### Verify your domain After adding the records, select **Validate** in Step 3. QwryAI looks up each record and marks the domain **Authenticated** once the DKIM and return-path records are found and the domain is ready to send. Until then, the domain shows **Unauthenticated** in **Email configuration**, with an **Authenticate** button that reopens this step once forwarding is verified for one of its addresses. > [!WARNING] > > DNS changes can take **24 to 48 hours** to spread. If validation fails right after you add the records, wait a few hours and try again. ## Step 4: Link the address **Link emails** chooses where each address is used: * **Email channel**: *Your AI agent replies from these addresses.* * **Ticketing**: *Your team replies to tickets from these addresses.* Pick the addresses for each, then select **Save**. An address can be linked once its forwarding is verified and its domain is authenticated. With no custom address selected, replies use your agent's built-in address. Select **Previous** to go back a step. > [!TIP] > > Once an address is linked to the **Email channel**, customers get replies from it (for example, `support@yourstore.com`) instead of your **Agent email address**. See [Email channel](/docs/user-guides/integrations/email). ## Adding and managing email addresses ### Adding more email addresses 1. Select **New email** in **Email configuration**. 2. Enter the new address (for example, `sales@yourstore.com`). 3. Complete the same steps: forwarding, domain authentication if the domain is new, and linking. > [!NOTE] > > On a domain that's already authenticated, you only need to set up forwarding and link the address. ### Managing existing email addresses **Email configuration** lists your addresses grouped by domain: * Each domain shows **Authenticated** or **Unauthenticated**, and an **Authenticate** button while it isn't. * **Assigned to** shows whether the address is used by the **Email channel**, **Ticketing**, or both. Select **Link** to assign an address that isn't used yet. * **Automatic forwarding** shows **On** once forwarding is verified, or **Off** with a **Set up** button that reopens the forwarding step. * The **⋯** menu on each row has **Edit links** and **Delete**. An address that the Email channel or Helpdesk is using can't be deleted until you unlink it. ## Company address **Company address** is the postal address shown in the footer of your marketing emails. It's **required to send Outbound email campaigns**, because US anti-spam law (CAN-SPAM) asks for a valid postal address in every marketing email. A P.O. box works. Enter it (up to 300 characters) and select **Save**. ![The Company address section with its address field and Save button.](annotated/05-company-address.webp "Company address: required for Outbound email campaigns.") ## Testing your setup Once forwarding and DNS are set up: 1. Send an email from an outside address (for example, your personal inbox) to one of your connected addresses. 2. Check that the conversation appears in your agent's conversations and that a reply arrives at your outside address. 3. Check the reply's sender: your **Agent email address** if your address isn't linked to the Email channel yet, or your own address once it is. If all of that looks right, your email support is ready. ## Troubleshooting ### Email forwarding issues **I don't see emails in my agent's conversations** * Check that forwarding is on and points to your exact **Agent email address**. * Look for filters or rules that archive or delete messages before they're forwarded. * Check whether your provider sent a forwarding confirmation email that still needs approving. It arrives in your conversations or **Helpdesk inbox**. * If you forward from Gmail, check **Spam**: Gmail doesn't forward messages marked as spam. See [Stop forwarded emails from going to spam](#stop-forwarded-emails-from-going-to-spam). ### DNS authentication issues **Domain validation fails** * Check for typos in the record names and values, and copy them exactly as shown. * Add the records in the right DNS zone: for `yourstore.com`, at the root; for `mail.yourstore.com`, on that subdomain. * Allow time for DNS to spread, up to 48 hours with some providers. **Some records verify but others don't** Each record is checked on its own. Compare each **Name** and **Value** in your DNS provider with the ones in Step 3, especially the `_domainkey` and return-path CNAMEs. ### Microsoft 365 forwarding blocked **Verification keeps failing and no emails arrive** * Microsoft 365 blocks external forwarding by default. Your admin needs to turn it on in the outbound spam filter policy. See [Allow external forwarding in Microsoft 365](#allow-external-forwarding-in-microsoft-365-work-accounts). * If the sender gets a bounce with `5.7.520 Access denied, Your organization does not allow external forwarding`, external forwarding is still blocked. ### General issues **I can't add more domains** Each agent can have up to **3 domains**. QwryAI shows *You can add up to 3 domains.* Delete the addresses on a domain you no longer use to free its slot. **I can't add more email addresses** Each domain can have up to **20 addresses**: *You can add up to 20 email addresses per domain.* Use another domain if you need more. **My domain is already in use** *This domain is already connected to another workspace.* A domain can belong to one QwryAI workspace at a time. **An address is rejected as not a business email** Addresses on free email providers can't be added. Use an address on your company's domain. **Emails are going to spam** Make sure the DKIM and return-path records show as verified, add the DMARC record, and check your domain's reputation with a tool such as [MXToolbox](https://mxtoolbox.com/). ## Limits | Limit | Value | | - | - | | Custom domains | 3 per agent | | Email addresses | 20 per domain | | Workspaces per domain | 1 | | Company address | 300 characters | ## Frequently asked questions > [accordion] Is the 3-domain limit per agent or per workspace? > > Per agent. Each agent can have up to 3 custom domains, with up to 20 addresses on each. > [accordion] Do I need to add an MX record? > > No. You add two CNAME records (DKIM and the return path) and a DMARC TXT record. Incoming mail reaches your agent through forwarding, so your MX records stay as they are. > [accordion] Is DMARC required? > > No. An address can send once forwarding is verified and the DKIM and return-path records are found. DMARC is recommended but doesn't block sending. > [accordion] Does the agent email change if I rename my agent? > > No. The **Agent email address** is created from your agent's name when you enable email, and it stays the same afterwards. To have customers see your own address, connect your domain. > [accordion] Can I use a Gmail or Outlook.com address? > > No. Connected addresses must be on a company domain. You can still forward from a Google Workspace or Microsoft 365 mailbox on your own domain. > [accordion] Can two workspaces use the same domain? > > No. A domain can be connected to one QwryAI workspace at a time. > [accordion] Can my team reply to tickets from these addresses? > > Yes. In **Link emails**, add the address under **Ticketing**, and your team's ticket replies are sent from it. ## Next steps > [card] Email channel | /docs/user-guides/integrations/email | Choose how your agent answers email and which address it replies from. > [card] Outbound campaigns | /docs/user-guides/chatbot/outbound-campaigns | Send email campaigns once your company address is set.