Skip to documentation
DocumentationEmail

Email

Let an agent send from your mailbox, search and read it, and sort its mail, while Sallyport keeps the password.

On this page

Your agent writes the message and Sallyport sends it from your own mailbox. It searches your inbox, reads messages and attachments, moves and flags mail. The password stays in Sallyport, and the agent never sees it.

Connect a mailbox

  • Open Connect a mailbox. From Credentials, it is Add a credential, then Email under Credential source.
  • Pick the Mail provider: Gmail / Google Workspace, Outlook / Microsoft 365, Yahoo Mail, iCloud Mail, Fastmail, Zoho Mail or Your own mail server. The servers, ports and encryption fill in and stay editable.
  • Enter the Email address and the Mailbox password. Most providers take an app password here, and the form links to the page that issues it.
  • Press Test connection. Sallyport signs in to each server and names the one that refused.
  • Press Save mailbox. The password is sealed and cannot be read back. Every agent of the workspace gets the mailbox.
ProviderPassword to use
Gmail / Google WorkspaceAn app password. Google issues one once 2-Step Verification is on.
Outlook / Microsoft 365The mailbox password. Your Microsoft 365 administrator turns on SMTP AUTH and IMAP sign-in with a password for the mailbox.
Yahoo MailAn app password from Account security.
iCloud MailAn app-specific password from your Apple Account.
FastmailAn app password with IMAP and SMTP access.
Zoho MailAn app-specific password. Organisation mailboxes use smtppro.zoho.com and imappro.zoho.com.

A mailbox sends through its SMTP server and is read through its IMAP server. Turn one off under Sending (SMTP) or Reading (IMAP), and its tools go with it.

Sign in with Google or Microsoft

Gmail and Microsoft 365 mailboxes sign in with the provider instead of a password. Under How Sallyport signs in, pick Sign in with Google or Sign in with Microsoft and press Save and sign in with Google or Microsoft. The provider asks you to allow access and brings you back to the key’s page.

  • Sallyport keeps the token in the vault and renews it on its own, like every key you sign in with. No password is stored.
  • Google signs in through Sallyport’s own app. At Microsoft you register an app of your own: the form gives the Redirect URI to add and takes its Client ID and Client secret. The app needs IMAP.AccessAsUser.All, SMTP.Send and offline_access.
  • The token goes to the provider’s own mail servers and nowhere else: smtp.gmail.com and imap.gmail.com, or smtp.office365.com, outlook.office365.com and smtp-mail.outlook.com.

What the agent can do

The agent keeps its Sallyport MCP connection. A mailbox gives it three tools, named after the connection:

ToolWhat it doesClass
_readlist_folders; search a folder; fetch one message by its uid; read one attachment by its part. Reading marks nothing seen.Read
_sendSends one message from the mailbox: to, cc, bcc, subject, text, html, reply_to, in_reply_to, references and attachments.Write
_changemove and copy to to_folder; flag and unflag with flags; delete; create_folder.Write. delete and flagging deleted are destructive.
Arguments of _read · the unread mail from billing
{
  "operation": "search",
  "from": "[email protected]",
  "unseen": true
}
Arguments of _send · a reply with a file
{
  "to": "Ana Lima <[email protected]>",
  "bcc": "[email protected]",
  "subject": "Re: Invoice 42",
  "text": "Paid today. The receipt is attached.",
  "in_reply_to": "<[email protected]>",
  "attachments": [{ "filename": "receipt.csv", "content_type": "text/csv", "content_base64": "YW1vdW50LGR1ZQo0MjAwLEZyaWRheQo=" }],
  "intent": "Confirm the payment of invoice 42"
}
Arguments of _change · file the paid invoice
{
  "operation": "move",
  "uids": [4102],
  "to_folder": "Archive",
  "intent": "File the paid invoice"
}
  • search answers the total and the newest messages, 20 by default and 100 at most, each with its uid, sender, subject, date and flags.
  • fetch answers the headers, the plain text, the HTML and the list of attachments with their part.
  • A message always leaves from the mailbox itself. Bcc goes to its recipients and never into the message.
  • A change touches only the messages it names. A uid the folder does not have comes back as missing.

Choose what waits for you

Mail runs without asking by default. To see every message before it leaves, open the agent in Agents and find the mailbox in its Access list. Set the write column to Approval required, or turn on Ask every call.

The approval card shows every recipient, Bcc included, the subject, the text and each file by name and size. The message that leaves is the one on the card.

Limits and safety

  • One message carries up to 100 recipients, 20 attachments and 10 MiB in all.
  • A message is read up to 80 MiB, its text and its HTML up to 2 MiB each. A longer answer is stored, and fetch_body reads it.
  • One operation runs up to 120 seconds.
  • TLS always, with a checked certificate: SMTP on 465 or 587, IMAP on 993 or 143. Port 25 is refused.
  • The journal keeps each message’s recipients, subject and file names. The text stays out.