Reference
@chloejs/ core/ tools/ resend
Sending one email through Resend, on a key.
The tool that sends one email through Resend, on the key the config gives connections.resend.
import * as resend from "@chloejs/core/tools/resend";
tools: { resendSendEmail: resend.sendEmail({ from, to, when: "..." }) }sendEmailfunction
export function sendEmail(options: SendOptions)Makes a tool that lets the model send an email through Resend, an email
sending service. You set the From line (from) and who it goes to (to).
The model writes only the subject and the body.
from must be on a domain you have set up in Resend. If email.provider
in settings is "none", nothing is sent: the subject is only written to
the log.
Needs the Resend connection: an API key in connections.resend.api_key.
tools: { resendSendEmail: resend.sendEmail({ from: "Shop <shop@example.com>", to: ["owner@example.com"], when: "When an order fails." }) }SendOptionsinterface
export interface SendOptions extends EmailSender {
/**
* Who the email reaches and when the model should send one, in your own
* words. Added to the tool's description for the model. Required.
*/
when: string;
/**
* A folder in the agent's memory, such as `"outbox"`. Each email sent is
* saved there as `<date>-<time>-<subject>.md` (for example
* `2026-09-23-0715-order-failed.md`), so the agent can check what it already
* said. Not set by default: no copies are kept.
*/
keep?: string;
}The options for gmail.sendEmail and resend.sendEmail. You set who sends
and who receives. The model writes only the subject and the body.