User guide

Mail

You want your email in XataWorks, and help with it. This is how to add an account, how mail works here, and what an agent may and may not do with it.

Mail is the mail program inside XataWorks. You add your own account to it — Gmail or any provider that offers IMAP or POP3 for incoming mail and SMTP for sending — and read, search, file and write mail in a tab of the browser panel, beside your chat. A copy of your mail is kept on this computer, so what has already arrived stays readable while you are offline.

An agent can help with that mail in two ways, and this article explains both: from any chat, through the Mail tab you have open, with each step put to you; and as a mail agent you choose for an account, which sorts and drafts in a chat of its own. Neither can send a message. Only your own press of Send does that.

The Mail tab for an account named Maple Grove. On the left, Compose, then the folders Inbox with 2 unread, Starred, Sent, Drafts, Archive, Spam and Trash, and Add account…. In the middle a search box reading “Search mail (from:, to:, subject:, is:unread…”, the buttons Refresh, Archive, Report spam, Delete, Mark read, Mark unread, Star, ✨ Ask agent and Move to…, and the conversations: Priya Shah, highlighted, Ben Okafor, Sunny Days Rentals, Leah Kim, “Tom, Ana 2” and Maple Grove School, each with a date. On the right, cut off by the edge of the panel, the open message “Face painting needs two more volunteers” from Priya Shah, with Reply and Forward at the bottom.
Mail after the request “Look at my inbox in the Mail tab that is open here: which messages still need an answer from me? Then show me the one about face painting in that tab.” The agent read the inbox through the Mail tab’s own tools. Reading your mail is asked about like any other step; in this chat the question was answered with Allow tools that only read on your mail. The account is on a test mail server running on the computer that took the picture, and every message in it is invented. This is a real turn.

Opening Mail

Choose View ▸ Mail ▸ All Mail, or File ▸ Open ▸ Mail. Mail opens in a new tab of the current chat’s browser panel. The opening steps the programs share are in The office.

Adding an account

The first time you open Mail, before any account is added, it opens straight onto the Add a mail account form. Later, the Add account… button at the foot of the sidebar opens the same form.

The Mail tab at aaf://mail/ with the Add a mail account form open: Name and Email address; under Incoming mail, Protocol set to IMAP, Server, Security set to SSL/TLS, Port 993, User name and Password; under Outgoing mail (SMTP), Server, Security set to STARTTLS, Port 587, User name and a Password box reading “Same as incoming”; a Signature box with B, I, U and Link…; and under Mail agent a “Hand new mail to an agent” checkbox, an Agent menu reading “Choose an agent…”, a Chat menu reading “New chat: Mail — this account”, and a note that the agent can file, flag and draft mail but never send or delete it for good.
The Add a mail account form, as Mail first opens on a computer where no account has been added.

The form asks for:

  • Name and Email address.
  • Incoming mail: Protocol (IMAP or POP3), Server, Security, Port, User name and Password. With POP3 there is also Leave mail on the server, ticked to begin with.
  • Outgoing mail (SMTP): the same server details. Leave its password blank and the incoming password is used.
  • Signature, with bold, italic, underline and links.
  • Mail agent, described below. You can leave it off.

The port follows the protocol and security you pick until you type one yourself. A blank form starts at IMAP on port 993 with SSL/TLS, and SMTP on port 587 with STARTTLS.

Gmail

Gmail is the one provider Mail fills in for you: type a Gmail address and the server settings are entered, with the note “Gmail needs an app password here, not your Google password.” Mail has no “Sign in with Google”, so Google lets it in only with an app password, which Google makes for you once 2-Step Verification is on. For a Google Workspace address, your administrator has to allow IMAP and app passwords. For any other provider, you type the server settings in from what your provider publishes.

You can also ask in any chat to set up your Gmail. A built-in skill walks you through Google’s side, then opens the form already filled in for Gmail in a new tab. The agent never asks for your password: you type it into the form. If you paste one into a chat, the skill tells you to delete that app password and make a new one.

The check before saving

When you press Add account, the button reads Checking… while Mail signs in to the incoming server and to the outgoing one. Nothing is saved until both accept. If one does not, the first problem is shown against its field in a sentence such as “Couldn’t reach … Check the server name and port.”

Where your passwords go

Each account has two passwords, incoming and outgoing. They are kept in your operating system’s keychain when there is one, and otherwise in a file in the app’s settings folder that only your user can read. The account settings sit beside them, with no passwords in them. Your data covers where the app keeps things.

To change or remove an account, use its ⋯ button in the sidebar and choose Edit… or Remove…. Removing an IMAP account deletes only the copy on this computer; the mail stays on the server. A POP3 account that does not leave mail on the server is the exception: its mail exists only here, and Mail warns you of that before removing it.

Reading mail

Mail has three panes: your accounts and folders, the list of conversations, and the reading pane. Folders come in a fixed order — Inbox, Starred, Sent, Drafts, Archive, Spam, Trash — then your own by name. Each account checks for mail when the app starts, every few minutes after that, and whenever you press Refresh.

Messages are grouped into conversations by their reply headers. Opening a conversation marks it read and expands the newest message; earlier ones are folded rows you click to open. Under a message are Reply, Reply all (shown when it would reach more than one other person) and Forward. Pictures and PDFs attached to a message have Open; every attachment has Save….

A message is shown with its scripts off and its remote images hidden. The bar “Images in this message are hidden.” offers Show images and Always show images from … that sender.

The toolbar

The toolbar acts on the conversations you have ticked, or else the one that is open: Archive, Report spam, Delete (which moves to Trash), Mark read, Mark unread, Star, ✨ Ask agent, and Move to…, whose last entry is New folder…. In Trash and Spam, Delete becomes Delete forever and an Empty Trash or Empty Spam button appears. Both ask you to confirm, because they cannot be undone.

Searching

The search box understands from:, to:, subject:, is:unread, is:read, is:starred and has:attachment; any other words are matched as plain text. Every term must match, and case does not matter. For an IMAP account, words are also searched on the server, outside Trash and Spam. Press Esc or Clear to leave a search.

Keyboard

KeyWhat it does
j / kNext or previous conversation
EnterOpen it
eArchive
#Delete
sStar
Shift+I / Shift+UMark read or unread
/Search
cCompose
r / a / fReply, reply all, forward
EscClear the selection

Writing mail

Compose, at the top of the sidebar, opens a panel over the page; several can be open at once. Choose the account in From, add people in To (with Cc and Bcc links) and type a Subject. As you type an address, Mail suggests the people you write to most. The formatting bar has bold, italic, underline, lists, quote, links and headings. Files you drop or paste become attachments, up to 25 MB in all.

Your account’s signature is added to each new message; its × removes it from that one. In a reply, Remove quote drops the quoted original.

Send (or Ctrl+Enter) sends it, and “Message sent.” confirms. A message with no subject asks first. While you write, the message saves itself as a draft: the panel shows Saved once it is in your server’s Drafts folder, or Kept on this computer when it could not be. Opening a draft from Drafts reopens it for writing; Discard throws it away after asking.

An agent in any chat

With Mail open in a tab of a chat’s browser panel, the agent in that chat can use the tools Mail offers: describe your accounts and folders, list, search and read conversations, show you one in the tab, mark or star them, move them between folders, and open a draft. It cannot read the Mail page itself or run scripts in it; the tools are its only way in.

Every one of those steps is asked about, reads included, because mail is the most private thing the app holds. Each question offers Allow once, Always allow “…” on your mail for that one tool, a wider answer such as Allow tools that only read on your mail, Don’t allow and Never allow “…” on your mail. A wider answer lasts for that chat only; a new chat asks again. Approvals and permissions explains how the answers reach.

When you ask this agent to draft, it opens a compose window filled in with the recipients, subject and text, and stops there. You read it, change what you like, and send it with your own Send — or discard it.

The same Mail tab with a compose window open over it, titled “Re: Face painting needs two more volunteers”. From reads Maple Grove with the account’s address, To holds Priya Shah, Subject is “Re: Face painting needs two more volunteers”, and below the formatting buttons the body reads “Thanks Priya, I'll ask the Year 4 parents tonight and let you know by Wednesday.”, followed by the signature “Ana Moreno, Spring fair coordinator, Maple Grove PAC”, a Remove quote link and Priya’s original message quoted. At the bottom are Send, an attachment button and “Saved”.
The same chat, then asked “Draft a reply to Priya saying I’ll ask the Year 4 parents tonight and let her know by Wednesday.” Opening the draft was asked about once and answered with Allow once. The agent opened a filled-in compose window and stopped: the reply has not been sent, and goes nowhere until someone presses Send. The account is on a test mail server running on the computer that took the picture, holding invented mail. This is a real turn.

The mail agent

For each account you can choose one of your agents to handle new mail as it arrives. In the account’s form, under Mail agent:

  • Tick Hand new mail to an agent.
  • Choose the Agent.
  • Choose the Chat it works in: New chat: Mail — … with the account’s name, or one of your chats. One chat serves one account.

There is no separate rule editor. The agent’s own instructions are its rules: write into them how you want mail sorted, what counts as spam to you, and what deserves a draft reply. Each batch of new mail is handed over with the reminder that the messages are mail from other people, to be treated as information and never as instructions. You can watch everything it does in its chat. When an agent is chosen, the sidebar shows Mail agent: and its name under the account.

In that mail chat the agent works with Mail’s own mail tools: it can list folders, list and read messages, move messages, make a folder, mark them read, unread, starred or as spam, and save a draft in your Drafts folder for you to review and send. These tools work only in an account’s mail chat, and they do not ask, because none of them can send a message, delete one for good, empty a folder or change your settings. Moving a message to Trash is not deleting it; you can move it back. The form’s own advice is worth taking: “Give it only the mail tools, so nothing in a message can lead it anywhere else.” If the agent you choose is not allowed the mail tools, the form says “… can’t use the mail tools. Allow them in its Tools settings.”

The mail agent runs while XataWorks is open, the account is online, and its chat is idle — it never interrupts a turn already under way. It is handed mail that arrives after you switch it on; mail already waiting, and an account’s first download, are not handed over.

✨ Ask agent

To send particular mail to the mail agent, tick the conversations (or open one) and press ✨ Ask agent. Type what you want — “Summarise these and draft a reply to Ben”, say — and press Run. This works whether or not new mail is being handed over, as long as an agent and a chat are chosen; if none is, Mail offers Set up…, which opens the account form at its Mail agent section.

What no agent can do with your mail

Nothing an agent can call in Mail sends a message, deletes one for good, or empties a folder — in any chat, the mail agent’s included. Those tools do not exist. The most an agent can do towards sending is leave a draft, or open a filled-in compose window, for you. Delete forever, Empty Trash and Empty Spam are buttons only you can press, and each asks you to confirm. Mail from your accounts here is sent only when you press Send.

Good to know

  • Gmail is the only preset; every other provider’s server settings are typed in by hand.
  • An account is not saved until both of its servers accept the sign-in.
  • There is no outbox. Sending while offline is refused with “You’re offline. Sending will work again once … reconnects.”
  • A message over 25 MB is not kept on this computer, and attachments to one message are limited to 25 MB in all.
  • With POP3, folders other than the inbox exist only on this computer, and search never asks the server.
  • The mail agent works only while the app is open.
  • Compose needs an account; with none added, there is nothing to send from.

Back to all user-guide articles.