# Connect a mailbox

Forward your support address to opendesk, and send replies from it with Google or Microsoft, your mail server, or a sending service such as Resend or Postmark.

A **mailbox** is a support address, such as `support@example.com`, connected to your workspace. Mail that arrives there becomes a ticket in the inbox, and your team's replies go back out from the same address, so customers see the address they wrote to.

Every mailbox has two halves:

- **Receiving.** Your provider forwards the address's mail to a private opendesk address, such as `margin-care-cace@in.opendesk.sh`. Forwarding works with every provider and shares no password. See [Forwarding](/guides/mailboxes/forwarding/).
- **Sending.** Connect Google or Microsoft to send replies through Gmail or Microsoft 365 from your own address, and they land in its Sent folder. Or add SMTP: your mail server, or a sending service such as Resend, Postmark or Amazon SES. Either way, replies come from the address customers wrote to.

Connecting Google or Microsoft lets opendesk send mail from the address you connect, and nothing else: it cannot read the mailbox. Mail reaches opendesk only because you forward it.

> **Good to know**
>
> On your own instance, mailboxes can also receive over IMAP, which is on by default ([`MAILBOX_IMAP`](/self-hosting/configuration/#receiving-over-imap)). The wizard then also offers an app password or the mailbox's password, and Google and Microsoft sign-in can sync the mailbox instead of using forwarding. See [Other providers](/guides/mailboxes/imap-smtp/). opendesk Cloud receives by forwarding.

## Add a mailbox

**1. Open Settings, then Mailboxes**

Click **Settings** at the bottom of the sidebar, then **Mailboxes** under **Channels**. Managing mailboxes needs the admin role.

![The app with Settings ringed in the main sidebar as 1 and Mailboxes ringed in the settings menu as 2](https://heykefu.com/guides/mailboxes/open-settings.webp)

**2. Click Add mailbox**

The button sits at the top right of the page.

![The top of the Mailboxes page with the Add mailbox button ringed](https://heykefu.com/guides/mailboxes/add-button.webp)

**3. Type the address**

Give the mailbox a **name** your team will recognise, like Support or Billing, and type the **email address** customers write to. When you leave the address field, opendesk looks up who hosts it: a known email provider, the domain's MX records, the domain's own autoconfig file, or its DNS service records. If it can't tell, you can still forward the mail and send through your own server settings.

![The email address care@margin.app ringed as 1, and below it Google Workspace, detected from the domain's MX records, ringed as 2](https://heykefu.com/guides/mailboxes/type-address.webp)

**4. Pick forwarding**

**Forward mail to opendesk** is recommended and works with every provider. Keep it selected and click **Continue**.

On an instance that receives over IMAP, **Choose another way** also lists ways that read the mailbox directly: **Sign in with Google** or **Sign in with Microsoft** to sync it, **App password**, **Email password** and **Other IMAP and SMTP**. See [Other providers](/guides/mailboxes/imap-smtp/).

**5. Choose how replies are sent**

Under **How replies are sent**, the ways that fit the provider are listed, the best one selected:

- **Connect Google** or **Connect Microsoft**, for Gmail, Google Workspace, Microsoft 365 and Outlook.com addresses when your instance offers it: you approve sending at the provider, and replies go out through it from your address. See [Gmail and Google Workspace](/guides/mailboxes/google/) and [Microsoft 365 and Outlook](/guides/mailboxes/microsoft/).
- **Your SMTP server**: replies go out from your address through your provider's server, or through a sending service such as Resend or Postmark. Pick the service under **Using a sending service?** and the server settings are filled in for you (see [Send with a sending service](#send-with-a-sending-service)). opendesk signs in to the server before it saves anything. If it refuses, you see why and how to fix it (see [When a connection fails](#when-a-connection-fails)).

![The connect step for support@contoso.com: How replies are sent, with Connect Microsoft selected and Your SMTP server below it, ringed as 1, and the Continue with Microsoft button ringed as 2](https://heykefu.com/guides/mailboxes/microsoft-forwarding.webp)

> **Good to know**
>
> On your own instance, mailboxes can also send **through opendesk**, which is on by default: replies go out from the instance's sending address with your mailbox's name, and customers' answers come back to your address. See [Sending through opendesk](/self-hosting/configuration/#sending-through-opendesk).

**6. Forward the mail**

Once the mailbox is created, opendesk shows the private address to forward to, with a copy button and the steps for your provider. Turn on forwarding at your provider as in [Forwarding](/guides/mailboxes/forwarding/). Gmail sends a confirmation email first: it arrives in opendesk as a ticket, so open it and click the link or copy the code. The address is also on the mailbox's page.

![Add a mailbox, done: the private forwarding address for returns@margin.app with its copy button ringed as 1, and the Google Workspace forwarding steps ringed as 2](https://heykefu.com/guides/mailboxes/forwarding-address.webp)

**7. Send a test email**

Write to the address from another account. The email shows up in **Unassigned** as a new ticket. Reply to it to check sending.

> **Good to know**
>
> - opendesk sends mail only from the address you connect, and you can disconnect at any time.
> - Passwords and sign-in tokens are encrypted at rest and never shown again after you save them.

## Ways to send, by provider

Every provider can forward its mail to opendesk. What differs is how replies go out from your address.

| Provider | Send with a sign-in | Send through SMTP |
| --- | --- | --- |
| Gmail, Google Workspace | Google sign-in, when your instance offers it | Gmail's server, with an app password and 2-Step Verification on |
| Outlook.com, Microsoft 365 | Microsoft sign-in, when your instance offers it | Microsoft's server, when your admin allows SMTP AUTH |
| Yahoo Mail, AOL Mail, iCloud Mail, Fastmail, Yandex Mail | No | With an app password |
| Zoho Mail | No | With the mailbox's password, or an app password when two-factor authentication is on |
| GoDaddy, Namecheap, IONOS, Hostinger, OVHcloud, Migadu, Purelymail, Rackspace, GMX | No | With the mailbox's password, or an app password if your account needs one |
| Proton Mail | No | Not from opendesk. Send through a sending service |
| Any other host | No | With detected or typed settings |

Any mailbox can also send through a [sending service](#send-with-a-sending-service) that has verified its domain. On your own instance, see [Mailbox sign-in](/self-hosting/configuration/#mailbox-sign-in) to offer Google and Microsoft sign-in, and [Sending through opendesk](/self-hosting/configuration/#sending-through-opendesk).

## Send with a sending service

A sending service, such as Resend, Postmark, SendGrid, Mailgun, Brevo or Amazon SES, sends your replies over SMTP from your support address. It suits a provider that has no SMTP server for opendesk, such as Proton Mail, or a team that already sends through one.

1. At the service, verify the domain of your support address. The service shows the DNS records to add (SPF and DKIM), so replies pass your customers' checks.
2. Create the SMTP credentials at the service, as in the table below.
3. In the wizard, under **How replies are sent**, choose **Your SMTP server**, then pick the service under **Using a sending service?**. The server, port, security and, where the service fixes it, the username are filled in. Paste the password and click **Connect**.

![The SMTP step for support@brightline.co: Using a sending service? with Resend picked, ringed as 1, and the outgoing mail settings filled in with smtp.resend.com, port 465, TLS and the username resend, ringed as 2](https://heykefu.com/guides/mailboxes/smtp-service.webp)

| Service | Server and port | Username | Password |
| --- | --- | --- | --- |
| Resend | `smtp.resend.com`, 465 with TLS | `resend` | An API key |
| Postmark | `smtp.postmarkapp.com`, 587 with STARTTLS | The server API token | The same server API token |
| SendGrid | `smtp.sendgrid.net`, 587 with STARTTLS | `apikey` | An API key with Mail Send access |
| Mailgun | `smtp.mailgun.org` (EU domains: `smtp.eu.mailgun.org`), 587 with STARTTLS | The domain's SMTP username | The domain's SMTP password |
| Brevo | `smtp-relay.brevo.com`, 587 with STARTTLS | The SMTP login | An SMTP key |
| Amazon SES | `email-smtp.<region>.amazonaws.com`, 587 with STARTTLS | The SES SMTP username | The SES SMTP password |

Any other service that relays over SMTP works the same way: type its server settings. Replies sent through a service don't land in your mailbox's Sent folder; the ticket keeps every reply.

Every provider's details: [Forwarding](/guides/mailboxes/forwarding/), [Gmail and Google Workspace](/guides/mailboxes/google/), [Microsoft 365 and Outlook](/guides/mailboxes/microsoft/) and [Other providers](/guides/mailboxes/imap-smtp/).

## When a connection fails

When a mail server refuses the sign-in, nothing is saved. The wizard says what went wrong and how to fix it, with each server's own reply underneath, so you can fix it and click **Connect** again.

![A refused connection: the cause, Google needs an app password, with its fix ringed as 1, and the IMAP and SMTP servers' replies ringed as 2](https://heykefu.com/guides/mailboxes/cause-and-fix.webp)

1. **The cause and the fix**: what the provider refused and the steps that solve it, with a link where there is a page to visit.
2. **The servers' replies**: what the outgoing (SMTP) server answered, and the incoming (IMAP) server on an instance that receives over IMAP, for you or your email admin.

The same causes show on a connected mailbox when **Test connection** fails.

## The most common causes

| What you see | What to do |
| --- | --- |
| **Google needs an app password** | The regular Google password was used. Turn on 2-Step Verification, create an app password and paste its 16 letters. See [Gmail and Google Workspace](/guides/mailboxes/google/). |
| **Google did not accept the app password** | Create a new app password while signed in to this exact address, not an alias or a group, and use it. A deleted app password stops working at once. |
| **IMAP is turned off in Google** | Only when the mailbox receives over IMAP. On Google Workspace, an admin allows IMAP in the Admin console under **Apps**, **Google Workspace**, **Gmail**, **End User Access**. |
| **Yahoo needs an app password**, and the same for AOL, iCloud, Fastmail and Yandex | Create an app password at the provider and use it instead of the account password. See [Other providers](/guides/mailboxes/imap-smtp/#app-passwords-by-provider). |
| **Microsoft needs Microsoft sign-in** | Microsoft does not accept a password over IMAP. Forward the mail instead, and send with Microsoft. See [Microsoft 365 and Outlook](/guides/mailboxes/microsoft/). |
| **SMTP sign-in is turned off in Microsoft 365** | An admin turns on SMTP AUTH for the mailbox, or you send with Microsoft instead. See [Turn on SMTP AUTH](/guides/mailboxes/microsoft/#turn-on-smtp-auth). |
| **The server refused the sign-in** | Check the username, usually the full address, and the password. If the account has two-step sign-in, use an app password. |
| **The mail port did not answer** | The SMTP port is blocked on the way. Use port 587 with STARTTLS. See [Ports and security](/guides/mailboxes/imap-smtp/#ports-and-security). |
| **The secure connection failed** | The security setting doesn't match the port: 465 and 993 use TLS, 587 and 143 use STARTTLS. |
| **Too many sign-in attempts** | The provider is limiting sign-ins. Wait 15 to 60 minutes before you try again. |
| **The server must be a public address** | opendesk connects only to mail servers on the public internet. Use the provider's public server name. |

## Manage your mailboxes

The **Mailboxes** page lists every address with how it connects and whether it is working.

![The Mailboxes settings page: the Add mailbox button, a summary of active and failing mailboxes, and a table of six mailboxes with their connection, team, status and last sync, each part numbered](https://heykefu.com/guides/mailboxes/overview.webp)

1. **Add mailbox** starts the setup for a new address.
2. **Summary**: how many mailboxes you have, and how many are active, need attention or are disabled.
3. **Connection**: the provider and how the mailbox connects: sign-in, app password, password or forwarding.
4. **Status**: **Active**, or **Needs attention** when the mailbox last failed to receive or send. **Not sending** means it has no way to send replies. Open the mailbox to see why.
5. **Actions**: test the connection, disable the mailbox, or remove it.

The **Last mail** column shows when mail last arrived at each address. It turns amber when an address has had no mail for a week, which usually means its forwarding stopped or its connection broke. Open the mailbox to see what to check.

## Choose how replies look

Open a mailbox from the list to change how it works. The **Name and addresses** section sets where new tickets go and what customers see.

![A mailbox's Name and addresses settings: the team for new tickets ringed as 1, and the From name with its preview ringed as 2](https://heykefu.com/guides/mailboxes/sending.webp)

1. **New tickets to this address go to** a team. [Routing](/guides/routing/) rules can still send a ticket elsewhere.
2. **From name**: what customers see as the sender. Click a variable to add it: `{agent}`, `{agent_first}`, `{team}`, `{brand}` or `{mailbox}`. The mailbox's **sender name**, just above, fills `{mailbox}`. The preview shows a reply and an auto-reply as customers will see them.

Other addresses that deliver into the mailbox, like `help@`, have a section of their own, described in [Aliases](#aliases) below.

## Aliases

An alias is another address that delivers into a mailbox, like `help@` or the `hello@` of a side project. Each alias works like a mailbox of its own, so one inbox can answer for several projects without another workspace. Aliases are free on every plan and never count as mailboxes.

Open an alias in the mailbox's **Aliases** section to give it:

- **A sender name**: what `{mailbox}` reads in the From name, and `{{ mailbox.name }}` in templates, for mail to the alias.
- **A team**: new tickets written to it go to that team instead of the mailbox's. A mailbox of a private team sends every alias to that team.
- **A brand**, once the workspace has a second one: new tickets written to it take that brand's email design, help center links, logo and satisfaction survey.
- **A signature**: mail to the alias carries it before the team's and the mailbox's. It takes the same variables as the mailbox's, and its preview fills them as a reply to the alias. See [Signatures](/guides/email-templates/#signatures).

![A mailbox's Aliases section: the list of aliases with 3 of 20 used ringed as 1, Gmail's other send-as addresses with Check again and Add ringed as 2, the open alias hello@lumen.studio with its sender name, team, brand and how replies go out ringed as 3, and its signature editor with a preview ringed as 4](https://heykefu.com/guides/mailboxes/aliases.webp)

1. **Aliases**: type an address and click **Add**. Up to 20 per mailbox.
2. **From Gmail**: the account's other send-as addresses, when the mailbox reads its Gmail inbox. Click **Add** to take one in.
3. **An alias, opened**: its sender name, the team and brand for new tickets written to it, and how its replies go out.
4. **Signature**: the alias's own, with a preview of a reply to it. Empty uses the team's or the mailbox's.

**How replies go out.** Replies to a ticket written to an alias go out as that alias wherever the mailbox can send as it, and otherwise from the mailbox's own address with the alias as the reply-to address, so the customer's answer still comes back to the alias. Each alias says which applies:

- **SMTP** sends from the alias.
- **Google** sends from an alias that Gmail lists as one of the account's send-as addresses. When the mailbox reads its inbox, opendesk reads that list when you connect, about once a day, and when you click **Check again**. A mailbox connected to send only can't read the list: add the address in Gmail first (**Settings > Accounts > Send mail as**), then turn on **Gmail can send as this address**.
- **Microsoft** sends from the alias where your Microsoft 365 tenant allows it. When Microsoft refuses, that reply goes out from the mailbox's address with the alias as the reply-to address, the alias is marked, and later replies go that way. Click **Try again** once the tenant allows it.
- **Sending through opendesk** sends from opendesk's address with the alias as the reply-to address.

**From Gmail.** When the mailbox reads its Gmail inbox, the Aliases section lists the account's other send-as addresses. Click **Add** to receive and answer an address's mail here; nothing is added on its own.

**Working an alias as its own inbox.** Click **Open its tickets** on an alias to see only the tickets written to it. Every email in a ticket shows the address it was written to, an email written to another address (a copy your mail provider forwards from an old address, or one you got in Cc or Bcc) shows that address beside the one that received it, and the inbox's **Address** filter lists each alias under its mailbox.

Further down, every mailbox has its own signature and an optional auto-reply.

![A mailbox's signature editor ringed as 1, and the auto-reply switch with its subject and message ringed as 2](https://heykefu.com/guides/mailboxes/replies.webp)

1. **Signature**: added below every email sent from this mailbox, unless the alias the customer wrote to or the ticket's team has its own signature.
2. **Auto-reply**: sent once when a customer opens a new ticket by email, with your subject and message. It is marked as automatic, so other autoresponders ignore it.

Both take [template variables](/guides/email-templates/variables/), such as `{{ contact.first_name | default: "there" }}` or `{{ ticket.number }}`: type `{{` for a variable, `{%` for logic, or click **Insert**. An auto-reply has no agent, so the agent variables are empty there. See [Email templates and signatures](/guides/email-templates/).

> **Good to know**
>
> - Automatic, bulk and list mail never gets an auto-reply, and neither does mail from another of your own addresses.
> - [Ollie](/guides/ollie/) can answer emails to a mailbox too: switch it on in the mailbox's **Ollie** section.

## Mail you send customers from your own addresses

Your shop, billing or booking system may send a customer an order confirmation from one of your addresses, with a copy to a mailbox. That copy opens a ticket about the customer: the contact is the first address in **To**, then **Cc**, that isn't yours, and replies, automation emails, auto-replies and surveys go to them. The message still shows your address as its sender, and nothing automatic answers it. When the customer answers, the reply joins that ticket.

It counts as your own mail when it comes from a mailbox address or an alias, or from another address at the domain of one of your mailboxes (not a public provider like gmail.com) when it passed DMARC and names none of your addresses in **To**. Mail written to your mailbox, like a colleague asking about a customer they copy, keeps the colleague as the contact.

A ticket whose contact is one of your mailbox addresses or aliases, such as one opened by such mail before, moves to the first person from outside who answers it, as long as the conversation was written to them. The timeline says so.

## Fix a mailbox that needs attention

A mailbox is **Active**, **Needs attention** (it last failed to receive or send), **Not sending** (it has no way to send replies) or **Disabled**. When it needs attention, its page shows the provider's last error and when it last worked.

![A mailbox's Connection section: the last sync error ringed as 1, and the Test connection button ringed as 2](https://heykefu.com/guides/mailboxes/connection-error.webp)

Fix the cause, often a changed password or an app password that was deleted, then click **Test connection**. The test checks receiving and sending separately and names the cause and the fix when one fails. For a password mailbox, enter the new password in the server settings below and save.

A mailbox marked **Not sending** has no way to send replies, such as one that sent through opendesk on an instance that has turned that off. Its page says **This mailbox can't send replies**. Its tickets and settings stay, and new mail still arrives, but no reply goes out from its address. The reply box in its tickets says so, automations skip their email replies, auto-replies and satisfaction surveys aren't sent, and Ollie leaves its answers as suggested replies instead of sending them. In its **Sending** section, choose SMTP (your mail server or a [sending service](#send-with-a-sending-service)), or connect Google or Microsoft.

A mailbox that read its mail over IMAP stops receiving when its instance turns IMAP receiving off; its page says so. Its tickets and settings stay. Switch it to forwarding on its page, then turn on forwarding at your provider with the address it shows, as in [Forwarding](/guides/mailboxes/forwarding/).

For a mailbox connected with Google or Microsoft sign-in, click **Reconnect** if access was revoked or the password changed. You sign in again, and the mailbox keeps its settings and tickets.

![A Google Workspace mailbox's Connection section with the Reconnect button ringed](https://heykefu.com/guides/mailboxes/reconnect.webp)

## Disable or remove a mailbox

Open the **⋯** menu on a mailbox's row, or scroll to the bottom of its page.

![The actions menu on a mailbox row: Test connection, Disable and Remove](https://heykefu.com/guides/mailboxes/row-actions.webp)

- **Disable** stops receiving and sending without removing anything. **Enable** starts it again.
- **Remove** deletes the mailbox. Its existing tickets stay; new mail to the address stops arriving.

To revoke opendesk's access at the provider as well, see [Gmail and Google Workspace](/guides/mailboxes/google/#disconnect) or [Microsoft 365 and Outlook](/guides/mailboxes/microsoft/#disconnect).

## Security

Passwords, app passwords and sign-in tokens are encrypted at rest with AES-GCM and are never shown again after you save them. A Google or Microsoft connection grants sending only, unless your own instance syncs the mailbox over IMAP. opendesk connects only to mail servers on the public internet, over TLS or STARTTLS unless you choose otherwise. Connecting or disconnecting a mailbox is recorded in the audit log. Managing mailboxes needs the admin role.

## Related

- [Forwarding](/guides/mailboxes/forwarding/), [Gmail and Google Workspace](/guides/mailboxes/google/), [Microsoft 365 and Outlook](/guides/mailboxes/microsoft/) and [Other providers](/guides/mailboxes/imap-smtp/)
- [Inbox and tickets](/guides/inbox-and-tickets/)
- [Mailboxes API](/api/resources/mailboxes/)
