Connect your email provider
HelloBox doesn't send or receive email by itself. It works through your account at an email provider: Postmark, Mailgun, Resend or Amazon SES. Your mail keeps going through that account, under your name and reputation; HelloBox shows it to your team and sends the replies.
This is the most important step, and the one that differs most between providers. Read Before you connect, pick your provider, and follow only its section.
This is a different job from the email HelloBox sends for sign-ups. You can use the same provider for both.
Before you connect
How mail reaches HelloBox
- Someone writes to
[email protected]. - The domain's MX record says your provider receives mail for
example.com. - Your provider calls a webhook: an address on your server, under
APP_URL, that says "new mail, here it is". - HelloBox stores the message and shows it in the inbox.
HelloBox sets the webhook up for you, through your provider's API. You never copy a webhook address by hand. But your provider has to be able to reach your server from the internet.
Check that your server is reachable
On your phone, turn off Wi-Fi so you use mobile data, and open
https://mail.example.com/login. If the sign-in page loads with a padlock, your provider can
reach you too.
It won't work if APP_URL is localhost, a private address like 192.168.1.20, or a site
without a valid certificate. Fix that first: see Turn on HTTPS.
Who can connect
Only a workspace admin can connect a provider. The person who created the workspace is one.
Which provider?
If you already send with one of these, use it. If you're choosing:
| Provider | Setting it up | Good to know |
|---|---|---|
| Postmark | Easiest. Paste one key. | Very good delivery. One Postmark server receives for one domain, so each extra domain needs a subdomain or another server. |
| Mailgun | Easy. Paste two keys. | Receives for many domains on one account. |
| Resend | Medium. Register an app once with one command, then sign in. | Domains and receiving are managed in Resend's own dashboard. |
| Amazon SES | The most work: about 30 minutes in AWS, once. | The cheapest at volume. New accounts start in a sandbox and need AWS's approval to send to anyone. |
You can connect more than one provider to a workspace later.
Postmark
What you need: a Postmark account, and to be its owner or an admin (only they can see account tokens).
A new Postmark account is pending approval: until Postmark approves it, it can only send to addresses at your own domain. Ask for approval in Postmark early; it's usually quick.
1. Copy your account API token
Postmark has two kinds of token. HelloBox needs the Account API token, which can see your whole account, so HelloBox can set up receiving for you. A Server API token won't work.
- Sign in at account.postmarkapp.com.
- Open Account in the top menu, then API Tokens.
- Copy the Account API token. It looks like
1a2b3c4d-1234-5678-9abc-1a2b3c4d5e6f.
2. Connect it in HelloBox
- In HelloBox, open Settings → Domains → Connect a provider → Postmark.
- Paste the token and press Connect.
- Pick a Postmark server (Postmark's word for a group of settings and message streams):
- A new server called HelloBox, if you're not sure. It keeps HelloBox apart from anything else you send with Postmark.
- An existing server, if your domain is already set up on it. If that server already sends its incoming mail somewhere else, HelloBox warns you before it takes over.
HelloBox then points the server's incoming mail at your instance, turns on delivery and bounce events, and lists the account's domains.
3. Set up your domain
Go on to Set up your domains. With Postmark, keep in mind:
- Add domain in HelloBox adds a domain to Postmark for you.
- A Postmark server receives for one domain. To receive for a second one, use a subdomain or connect another Postmark server.
- Postmark only starts receiving once it sees the MX record. HelloBox asks every minute. Wait until the domain shows Waiting for the first email before you rely on it, or early mail bounces.
Mailgun
What you need: a Mailgun account.
1. Copy two keys
Both are on the same page in Mailgun:
- Sign in at app.mailgun.com.
- Open the account menu (top right), then API Security (direct link).
- Under Mailgun API keys, press Add new key, name it
HelloBox, and copy the key. Mailgun shows it only once. Use a full API key: a domain sending key can only send, so HelloBox couldn't set up receiving with it. - On the same page, find the HTTP webhook signing key and copy it too. HelloBox uses it to check that every notification really comes from Mailgun.
2. Connect it in HelloBox
- Open Settings → Domains → Connect a provider → Mailgun.
- Paste the API key and the HTTP webhook signing key, and press Connect.
HelloBox finds out by itself whether your account is in Mailgun's US or EU region, sets up delivery events, and lists your domains.
3. Set up your domain
Go on to Set up your domains. Add domain in HelloBox adds a domain to Mailgun, and turning on receiving creates the Mailgun route that sends its mail to HelloBox.
Resend
Resend connects by OAuth: you sign in to Resend and press Allow, the way you'd let an app use your Google account. No key to copy each time.
For that, Resend has to know your HelloBox instance. You register it once as an OAuth app,
and put the two values Resend gives you in .env. Resend has no screen for this yet, so you
do it with one command. After that, everyone on your instance connects with a click.
What you need: a Resend account, with your domain added and verified in Resend.
1. Register your instance with Resend (once)
Run this from any terminal: your computer or the server. Change the two mail.example.com
addresses to your APP_URL first.
curl -X POST https://api.resend.com/oauth/register \
-H 'Content-Type: application/json' \
-d '{
"client_name": "HelloBox (mail.example.com)",
"client_uri": "https://mail.example.com",
"redirect_uris": ["https://mail.example.com/api/resend/oauth/callback"],
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"],
"token_endpoint_auth_method": "client_secret_basic"
}'What the parts mean:
client_nameis the name Resend shows when someone presses Allow. Make it clear it's your instance.redirect_urisis where Resend sends people back after they allow access. It must be yourAPP_URLfollowed by/api/resend/oauth/callback, exactly.client_secret_basicasks for a secret, so only your server can use the app.
Resend answers with something like this (shortened):
{
"client_id": "550e8400-e29b-41d4-a716-446655440000",
"client_secret": "3vProAFw7...",
"client_secret_expires_at": 0,
"client_name": "HelloBox (mail.example.com)",
"redirect_uris": ["https://mail.example.com/api/resend/oauth/callback"]
}Copy client_id and client_secret into your password manager now. Resend shows the
secret only this once. If you lose it, run the command again to register a new app.
If the answer is an error instead:
| Error | What to do |
|---|---|
invalid_request | A typo in the command, or a redirect_uris address that isn't https://. Check the quotes and the address. |
too_many_requests | Resend allows 20 registrations an hour from one address. Wait an hour. |
2. Add them to HelloBox
On the server, in ~/hellobox/docker, open .env (nano .env) and set:
RESEND_OAUTH_CLIENT_ID=550e8400-e29b-41d4-a716-446655440000
RESEND_OAUTH_CLIENT_SECRET=3vProAFw7...Save, then apply it:
docker compose up -dIf you ever change APP_URL, the redirect address no longer matches: register again with the
new address and replace both values.
3. Connect it in HelloBox
- Open Settings → Domains → Connect a provider → Resend.
- Resend opens. Sign in to the Resend account you want to connect, check the app's name (the
client_nameyou chose), and press Allow. - You land back in HelloBox, connected. HelloBox creates the webhook in Resend for you and lists your domains.
A workspace connects one Resend account. To see or remove HelloBox's access from Resend's side, open Team settings in Resend.
4. Set up your domain
With Resend, domains are managed in Resend's dashboard, not in HelloBox:
- Add and verify the domain in Resend (Domains → Add domain), if you haven't.
- Turn on receiving for it in Resend, and add the MX record Resend shows.
- Back in HelloBox, reload Settings → Domains: the domain appears under the Resend connection. Press Check again on it if it still says Waiting for DNS.
Receiving on a subdomain works from HelloBox, as for other providers.
Amazon SES
SES is the cheapest provider, and the one that takes the most setting up. Set aside half an hour, read the whole section first, and do it in order.
How it works, in plain words
HelloBox never asks for your AWS password or keys. Instead:
- You run a small piece of AWS for HelloBox, called the broker. It's an AWS user that can do exactly one thing: borrow permissions that someone gave to HelloBox. It holds no mail.
- When someone connects SES, they launch a stack (a ready-made set of AWS resources, from a template file) in their AWS account. It creates a role: a set of SES permissions that only your broker may borrow, and only with a secret that belongs to that one connection.
- To delete the stack is to disconnect. Access ends at once.
You set up the broker once per HelloBox instance (part 1). Connecting is then a few clicks (part 2), and can be done by anyone on your instance with their own AWS account.
Words you'll meet in the AWS console:
| Word | What it is |
|---|---|
| Region | Where in the world AWS runs something, like eu-west-1 (Ireland). The region picker is at the top right of the console. |
| CloudFormation | The AWS service that creates resources from a template file. A stack is one use of a template. |
| IAM | Identity and Access Management: AWS's users, roles and permissions. |
| Access key | A key ID and a secret that let a program act as an IAM user. |
| S3 bucket | A folder for files in AWS. |
What you need:
- An AWS account (create one). The broker costs nothing to run; SES itself charges per email.
- About 30 minutes, and a password manager for the keys.
Part 1: set up the broker (once)
We recommend a separate AWS account for the broker, so it stays apart from the account with your mail. With AWS Organizations you can make one from your main account in a minute. If you run HelloBox only for yourself, one account for both also works.
1. Download the two template files. Save both to your computer (right-click, Save link as):
- broker.yaml: the broker.
- connect.yaml: what people launch to connect.
2. Create the broker stack.
- Sign in to the AWS console with the broker's account.
- At the top right, pick a region. Any works; pick one near you.
- Search for CloudFormation in the top bar and open it.
- Press Create stack → With new resources (standard).
- Choose Choose an existing template, then Upload a template file, pick
broker.yaml, and press Next. - Stack name:
hellobox-broker. Press Next. - Leave the options page as it is. Press Next.
- At the bottom of the review page, tick I acknowledge that AWS CloudFormation might create IAM resources with custom names, and press Submit.
Wait a minute, until the stack's status says CREATE_COMPLETE (press the refresh button).
Then open its Outputs tab and keep it open: you need BrokerAccountId, TemplatesBucket
and TemplatesBaseUrl.
The stack created:
- an S3 bucket called
hellobox-templates-<your account number>, where the connect template goes; - a user called
hellobox-broker, which HelloBox runs as; - a user called
hellobox-template-publisher, for publishing the template from the command line. You don't need it if you follow step 4 below.
3. Make an access key for the broker.
- Search for IAM in the top bar and open it. Open Users, then
hellobox-broker. - Open the Security credentials tab, and press Create access key.
- Choose Application running outside AWS, press Next, then Create access key.
- Copy the Access key and the Secret access key into your password manager. AWS shows the secret only once.
4. Upload the connect template.
- Search for S3 and open the bucket
hellobox-templates-<your account number>. - Press Create folder, name it
templates, and create it. - Open the
templatesfolder, press Upload, addconnect.yaml, and press Upload.
The file must end up at templates/connect.yaml, exactly. To check, open
<TemplatesBaseUrl>/connect.yaml in your browser: it should show the template's text (or
download it).
From the command line instead: make an access key for
hellobox-template-publisher, set it up withaws configure, and runAWS_TEMPLATES_BUCKET=<TemplatesBucket> scripts/publish-aws-templates.shfrom thehelloboxfolder. It also checks the template.
5. Give the values to HelloBox. On the server, open .env (nano .env in
~/hellobox/docker) and set:
AWS_BROKER_ACCOUNT_ID=<BrokerAccountId output>
AWS_BROKER_ACCESS_KEY_ID=<the broker's access key>
AWS_BROKER_SECRET_ACCESS_KEY=<the broker's secret access key>
AWS_BROKER_REGION=<the region you created the stack in, like eu-west-1>
AWS_TEMPLATES_BASE_URL=<TemplatesBaseUrl output>Save, then apply it:
docker compose up -dAmazon SES now shows up in Connect a provider. It stays hidden as long as any of these is missing.
When a new HelloBox release changes connect.yaml (its release notes say so), upload the new
file the same way. Stacks people already launched keep working.
Part 2: connect your AWS account
Use the AWS account that has, or will have, your SES setup. If you haven't used SES before, that's fine: HelloBox sets it up.
- In HelloBox, open Settings → Domains → Connect a provider → Amazon SES.
- Region: where SES will run. If you already use SES, pick the region your domains are verified in. Otherwise pick one near you. Every region in the list can receive mail.
- Set up DNS in Route 53 for me: tick it if your domain's DNS is in AWS Route 53. HelloBox then adds the records itself. It never replaces an MX record that points somewhere else.
- Press Open AWS. Sign in to AWS in the new tab if asked, with the account you want to connect.
- AWS shows Quick create stack, with everything filled in. Don't change anything. Scroll to the bottom, tick I acknowledge that AWS CloudFormation might create IAM resources, and press Create stack.
- Go back to the HelloBox tab. It updates by itself: first Waiting for the stack in AWS, then Stack created, then Connected. This takes a minute or two.
If it stays on "Waiting" for more than five minutes, open CloudFormation in that region and
look at the stack called HelloBox-...:
| Status | What to do |
|---|---|
| No stack | You closed the AWS tab before Create stack. Use Open it again in HelloBox. |
CREATE_IN_PROGRESS | Wait a little longer. |
ROLLBACK_COMPLETE | The stack couldn't reach HelloBox. Check that your server is reachable, delete the stack, and connect again. The Events tab says what failed. |
Part 3: domains, and leaving the sandbox
Add your domain. In Settings → Domains, under the SES connection, press Add domain. HelloBox adds it to SES and shows the DNS records, then continue with Set up your domains. Turning on receiving adds the domain to SES's receipt rule for you.
The sandbox. Every new SES account starts in the sandbox: it can only send to addresses you've verified. HelloBox shows this under the connection, with two buttons:
- Test recipients: add an address, AWS emails it a confirmation link, and once it's confirmed you can send to it. Use it to try things out.
- Request production access: asks AWS to lift the limit. Say what you'll mostly send (Transactional and replies for a team inbox) and describe your use in a sentence or two: for example, "Replies to customers who email our support address, sent by our team." AWS says it answers within 96 hours, may email you questions, and decides by itself.
Once approved, HelloBox shows Production access is on, with your daily sending limit.
Disconnecting in HelloBox stops new mail and sending, and removes HelloBox's receipt rule.
Your existing mail stays in HelloBox. To end HelloBox's access completely, also delete the
HelloBox-... stack in CloudFormation.
For anything else about SES itself, see AWS's SES guide.
Set up your domains
After you connect, Settings → Domains lists the domains in your provider account. For Postmark, Mailgun and SES, Add domain adds a new one; for Resend, add it in Resend.
Add the DNS records
For each domain, HelloBox shows the DNS records it still needs:
| Record | What it does |
|---|---|
| TXT (SPF, DKIM) and sometimes CNAME | Prove your provider may send for the domain, so your mail doesn't land in spam. |
| MX | Sends the domain's incoming mail to your provider. Only needed to receive. |
Add them at your DNS host, the same way you added the A records: copy each Name and Value exactly, as HelloBox shows them. Then press Check again. DNS changes can take up to an hour.
If your DNS is in Cloudflare and your instance has the Cloudflare settings (CF_CLIENT_ID and
CF_CLIENT_SECRET), Add DNS records writes them for you. With SES and Route 53, the box you
ticked when connecting does the same.
Turn on receiving
Each domain has a switch, Receive mail for this domain. Turn it on to get the domain's mail in HelloBox. (With Resend, receiving is turned on in Resend.)
What the labels mean
| Label | Meaning |
|---|---|
| Waiting for DNS | Your provider doesn't see the records yet. Check them and wait. |
| Verified | Sending works. |
| Receiving waits for the MX | Receiving is on, but the provider doesn't see the MX record yet. |
| Waiting for the first email… | All set. Send a test. |
| Receiving | Mail is arriving. |
Receive on a subdomain
Already receive mail at this domain somewhere else, like Google Workspace or Microsoft 365? Changing the MX record would move all of it to HelloBox. Don't.
Use Receive replies on a subdomain under the domain instead. HelloBox receives at, say,
inbox.example.com; the mail you already get at example.com stays where it is. You keep
sending from example.com, and HelloBox shows you how to set a Reply-To so replies land in
HelloBox.
Send a test
Once a domain shows Waiting for the first email…, send an email to any address at it from your personal email. It should appear in HelloBox within a few seconds. Reply to it and check that the reply arrives. (With SES in the sandbox, your personal address must be a test recipient first.)
Nothing shows up? See Troubleshooting.
The webhook addresses
HelloBox creates these at your provider for you. You only need them to check your provider's
settings. Each starts with your APP_URL; <connection> is a long random ID that keeps the
address private.
| Provider | Webhook addresses |
|---|---|
| Postmark | /api/webhooks/postmark/<connection>/inbound and /events |
| Mailgun | /api/webhooks/mailgun/<connection>/inbound and /events |
| Resend | /api/webhooks/resend/<connection> |
| Amazon SES | /api/webhooks/ses/<connection>/inbound and /events |
If you change APP_URL later, your provider still calls the old addresses: press
Reconnect (or Connect again) on each connection.
Use another provider
These four are built in. If you use another one, you can add it: each provider is one
implementation of the MailProvider interface, and Postmark and Mailgun are the shortest
examples. Read the contributing guide, or ask in
Discussions first.
HelloBox is set up. The pages after this one are for later: back up and upgrade.
Something wrong or missing? Open an issue or edit the file in the repository.
Sign in and invite your team
HelloBox is reachable. Now make your account, decide who else can sign up, and, if you want, set up the admin tool.
Back up and restore
A server can die, a disk can fail, an upgrade can go wrong. A backup is a copy of everything HelloBox needs, kept somewhere else, so you can start again on a new server without losing mail.