| Member | Does |
|---|---|
| send(options) | Sends from this address. |
| update(changes) | Name, catch-all, picture, signature. |
| forward(addresses) | Copies elsewhere. Five at most. |
| remove() | Deletes it. |
| messages | list · get · update · remove · search. |
| aliases | list · add · remove. |
const box = await api.mail.get("hello@example.com");
const { messages, unreadCount } = await box.messages.list({ folder: "inbox", unread: true });
await box.send({ to: "someone@example.net", subject: "Hi", text: "…" });box = api.mail.get("hello@example.com")
page = box.messages.list(folder="inbox", unread=True)
messages, unread_count = page["messages"], page.get("unreadCount")
box.send(to=["someone@example.net"], subject="Hi", text="…")What it carries
address · local · hoststringThe address, and its two halves.
namestringThe display name.
avatar · avatarSourcestring|nullIts picture, and where it comes from: mailbox, account, or nothing.
signatureobject|null{ html, image }, added to sends.
sourcestringiagenify or imap.
usedBytes · quotaBytesintegerWhat it holds, against the account's object storage.
aliasList · forwardTostring[]Addresses that land here, and copies sent on.
catchAllbooleanWhether unknown addresses on the host land here.
status · lastMessageAtIts state, and when something last arrived.
A picture follows a chain
The mailbox's own, then the account's, then nothing. avatarSource says which — so an interface can offer « use a picture of its own » meaningfully.