Skip to main content
Use sendMessage(...) when your app receives or reacts to incoming email.
const inbox = await mail.inbox({ new: true });

await inbox.sendMessage({
  to: ["support@example.com"],
  subject: "Need help",
  text: "The test user is asking for support.",
});

Send HTML

await inbox.sendMessage({
  to: ["support@example.com"],
  subject: "Need help",
  html: "<p>The test user is asking for <strong>support</strong>.</p>",
});

Reply To An App Email

const original = await inbox.waitForMessage({});

await inbox.sendMessage({
  to: [original.from],
  subject: `Re: ${original.subject}`,
  text: "Thanks, this worked.",
});
For files, see Attachments. For the full sendMessage(...) shape, see the Mail Reference.
Last modified on April 24, 2026