IMAP
Read an inbox from Apple Mail, Outlook or Thunderbird over IMAP, with an API key as the password. Host, ports, mailboxes, flags and limits per plan.
Every inbox can also be opened from a mail client such as Apple Mail, Outlook or Thunderbird. BillionSend runs an IMAP server (IMAP4rev1 with IDLE) in front of the same mail the API, the dashboard and the MCP server read, so people can follow an agent’s inbox in the client they already use.
IMAP is for reading and organizing: you can read mail, search it, and mark it read or starred. You cannot delete, move or upload mail over IMAP. IMAP is part of Starter, Pro and Scale; Free does not include it.
Connect
| Setting | Value |
|---|---|
| Host | imap.billionsend.com |
| Port, implicit TLS | 993 |
| Port, STARTTLS | 143 |
| Username | The inbox’s email address, for example orders@inbound.example.com |
| Password | An API key of the team (bs_...) |
| Authentication | Normal password (LOGIN or AUTHENTICATE PLAIN) |
TLS is required on both ports. On port 143 the client must issue STARTTLS before it logs in; a login sent in the clear is refused. Each IMAP account is one inbox: to read two inboxes, add two accounts.
The dashboard shows the same host, ports and user name in the inbox’s Settings tab, next to the inbox’s own API keys.
Which keys work
The password must be a full access key. A sending-only key cannot read mail over the API, and cannot over IMAP either.
- A team-wide full-access key opens any inbox of its team.
- A key limited to one domain opens only the inboxes on that domain.
- A key limited to one inbox opens only that inbox. Giving each person or agent its own inbox key keeps access to a single mailbox, and revoking the key ends it.
A key that is revoked stops working at its next command, and so does one whose creator left the team. A wrong key, an address that is not an inbox of the team, and an inbox outside the key’s limits all answer the same Invalid username or password, so a login does not reveal which inboxes exist.
Set up a mail client
Use the inbox address as the email address and the user name, the API key as the password, and the host and port above. The steps differ a little in each client.
Apple Mail
- Choose Mail → Add Account → Other Mail Account.
- Enter any name, the inbox address, and the API key as the password.
- When Mail cannot find the settings by itself, choose IMAP and enter
imap.billionsend.comas the incoming mail server, with the inbox address as the user name and the API key as the password. Mail uses port 993 with TLS by default. - For the outgoing server, see Sending from a mail client below.
Outlook
- Choose Add account, enter the inbox address, and choose to set the account up manually as an IMAP account.
- Incoming server:
imap.billionsend.com, port993, encryption SSL/TLS. Password: the API key. - Outgoing server: see the Sending from a mail client section below.
Thunderbird
- Choose Account Settings → Account Actions → Add Mail Account, enter the inbox address and the API key, and choose Configure manually.
- Incoming: IMAP,
imap.billionsend.com, port993, SSL/TLS, authentication Normal password, user name the inbox address. - Outgoing: see the Sending from a mail client section below.
Check from a terminal
openssl s_client -quiet -connect imap.billionsend.com:993
a1 LOGIN orders@inbound.example.com bs_...
a2 SELECT INBOX
a3 FETCH 1:5 (FLAGS ENVELOPE)
a4 LOGOUT
Sending from a mail client
IMAP only reads. A mail client needs an outgoing server to reply, and the SMTP relay takes the same key: host smtp.billionsend.com, port 465 (TLS) or 587 (STARTTLS), user name billionsend, password the API key. A key limited to one inbox sends only from that inbox’s address. The inbox’s send rules still apply, and a send they hold is refused over SMTP with a 550 that asks for a draft a person approves.
Mailboxes
A mail client shows one account per inbox, with these mailboxes:
| Mailbox | Holds |
|---|---|
INBOX |
Delivered mail in threads that sit in the inbox folder. |
Archive |
Mail in archived threads. |
Junk |
Mail in threads in the spam folder. |
Sent |
Mail sent from this inbox, outside the trash. |
Trash |
Mail and sent mail in trashed threads. |
Labels/<name> |
Mail in threads that carry the label. A / in a label name shows as -. |
- Mail held in quarantine or still being screened is never listed, as for an agent’s key in the API. Mail whose content retention already removed is not listed either.
- Each mailbox lists the newest 10,000 messages. Older ones are in the dashboard and the API.
- Moving a thread to another folder or label in BillionSend shows in the client as the message disappearing from one mailbox and appearing in the other.
- A message in
Sentis rebuilt from the stored fields (sender, recipients, subject, text, HTML and attachments), so it carries the same content as the sent mail but not the exact bytes or the headers added in transit. - Folder and label names use the standard IMAP encoding, so non-Latin label names work.
Flags and read state
| Flag | Where it lives |
|---|---|
\Seen |
The same read state as the dashboard and the API: reading a message in your client marks it read there too. Sent mail is always read. |
\Flagged |
Stored for IMAP only; the dashboard does not show it. |
Other flags (\Answered, \Draft, \Deleted, custom keywords) are not stored. Setting \Deleted is refused with NO [CANNOT], and EXPUNGE is refused: mail is deleted in BillionSend, never over IMAP. APPEND, COPY, MOVE, CREATE, DELETE and RENAME are not supported.
Fetching a message body without PEEK (as most clients do when you open a message) marks it read. A mailbox opened with EXAMINE is read-only and changes no flag.
Search and live updates
SEARCHsupports the usual criteria: read state, flags, dates, sizes,UID,NOTandOR, and the content criteriaFROM,TO,CC,BCC,SUBJECT,HEADER,BODYandTEXT. Content criteria read the messages one by one, so one search reads at most 300 messages (128 MiB) and answersNO [LIMIT]past that. Narrow it withSINCE,BEFOREorUNSEEN. The search in the dashboard and in the API has no such limit.IDLEkeeps the connection open and tells your client about new mail, changed flags and messages that moved away, usually within a moment and at most about 25 seconds late.- A session that sends nothing for 30 minutes is logged out, and a connection that has not logged in after 60 seconds is closed.
Limits
| Plan | IMAP connections at once, across the team |
|---|---|
| Free | Not available |
| Starter | 5 |
| Pro | 20 |
| Scale | 100 |
- On Free the login answers
NO [CANNOT] IMAP is not part of the Free plan. A team on an unclaimed agent account is on Free. - Past the plan’s connections a login answers
NO [LIMIT]naming the plan. Mail clients commonly open a few connections per account, so give several people or agents their own accounts within the limit. - One IP address can hold 30 connections. Three failed logins close a connection, and 20 failed logins from one address in 10 minutes refuse further logins from it until the 10 minutes have passed.
- Plans are checked on every command: after a downgrade to a plan without IMAP, an open connection ends at its next command.
- A command line is at most 64 KiB and an upload literal 1 MiB; longer ones answer
BADand close the connection. - A temporary problem on BillionSend’s side answers
NO [UNAVAILABLE]. The client retries later and no mail is lost.
See Plans and limits for what each plan includes.