Skip to main content

ReadEmail

Reads the full content of a specific email message. You must own the message’s mailbox. Inputs
message_id
string
required
The UUID of the message to read.
format
string
Response format for message content. Options: text, html, html2text. Defaults to "html2text".
  • html2text — HTML converted to clean readable text preserving links and structure. Recommended for AI agents (minimal tokens, preserves structure).
  • text — original plain text part.
  • html — both plain text and full HTML content.
Output
id
string
The message UUID.
subject
string
Email subject line.
from
string
Sender address.
to
array
List of recipient addresses.
cc
array
List of CC addresses.
date
string
ISO 8601 timestamp of when the email was sent.
text_content
string
Message body in the requested format. When using html format, html_content is also included.
thread_id
string
The conversation thread this message belongs to.
thread_message_count
integer
Total number of messages in the thread. When greater than 1, call ReadThread to see the full conversation.
has_attachments
boolean
Whether the message has any attachments.
attachment_count
integer
Number of attachments on the message.
attachments
array
List of attachment metadata. Each item includes id, filename, mime_type, and size. Use the id with DownloadAttachment to retrieve file content.

WaitForEmail

Waits for a new email to arrive in a mailbox, streaming progress notifications while waiting. Only detects emails that arrive after the tool is called. Inputs
email_address
string
required
The mailbox email address to wait for.
timeout
integer
Maximum number of seconds to wait. Must be between 5 and 120. Defaults to 30.
format
string
Response format for message content. Options: text, html, html2text. Defaults to "html2text".
Output when an email arrives
status
string
Always "received" when an email arrived within the timeout period.
id
string
The message UUID.
subject
string
Email subject line.
from
string
Sender address.
to
array
List of recipient addresses.
cc
array
List of CC addresses.
date
string
ISO 8601 timestamp of when the email was sent.
text_content
string
Message body in the requested format.
thread_id
string
The conversation thread this message belongs to. Call ReadThread to see the full conversation context.
has_attachments
boolean
Whether the message has any attachments.
attachment_count
integer
Number of attachments on the message.
Output when the timeout is reached
status
string
Always "timeout" when no email arrived within the timeout period.
mailbox
string
The email address that was monitored.
waited_seconds
integer
Number of seconds the tool waited before timing out.
message
string
A human-readable description of the timeout.
The tool streams notifications/progress events every 2 seconds so your agent receives confirmation it is still running. If you need to wait longer than 120 seconds, call WaitForEmail again after it returns.

DeleteEmail

Deletes a specific email message. You must own the message’s mailbox.
This action is irreversible. The message cannot be recovered after deletion.
Inputs
message_id
string
required
The UUID of the message to delete.
Output
deleted
boolean
Always true when the message was successfully deleted.
message_id
string
The UUID of the deleted message.

DownloadAttachment

Downloads a specific email attachment and returns its content as base64. You must own the attachment’s mailbox. Inputs
attachment_id
string
required
The UUID of the attachment to download. Obtain attachment IDs from the attachments array in a ReadEmail response.
Output
id
string
The attachment UUID.
filename
string
Original filename of the attachment.
mime_type
string
MIME type of the attachment (e.g., "application/pdf").
size
integer
File size in bytes.
content_base64
string
Base64-encoded file content.
Attachments larger than 10 MB return an error. Download large files directly from the AgentPost web interface instead.

SendEmail

Sends an outbound email from a mailbox on a verified custom domain. The message is queued for delivery asynchronously.
The sending mailbox must exist on a custom domain in active or pending_warmup status. Domains in warmup are limited to 10 emails per day; active domains are limited to 50 emails per day (configurable). Exceeding the daily quota returns an error.
Inputs
from_email_address
string
required
The full email address of the sending mailbox (e.g., "sales@example.com"). The mailbox must exist on a verified custom domain you own.
to
string[]
required
Array of recipient email addresses.
subject
string
required
Email subject line. Maximum 998 characters.
body
string
required
Plain text body of the email.
html_body
string
HTML body for multipart emails. When provided, recipients see HTML with the plain text body as a fallback.
in_reply_to
string
Message-ID of the email you are replying to. Threads the outbound message as a reply in the recipient’s email client.
attachments
array
Array of attachment objects to include with the email. Maximum 20 attachments per message. Each object must include:
  • filename (string) — the file name (e.g., "report.pdf")
  • mime_type (string) — MIME type (e.g., "application/pdf")
  • content_base64 (string) — base64-encoded file content
Per-attachment size limit: 25 MB. Total attachment size limit: 25 MB.
CC and BCC are not currently supported. Only direct recipients via the to field are accepted.
Output
message_id
string
Unique identifier for the queued message.
status
string
Always "queued" when the message was accepted for delivery.
attachment_count
integer
Number of attachments included with the message.