Skip to main content

Documentation Index

Fetch the complete documentation index at: https://stackauth-e0affa27-chore-move-mcp-to-a-sep-app.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This is a detailed reference for email-related types in Stack Auth. If you’re looking for a more high-level overview, please refer to our guide on the email system.

SendEmailOptions

Options for sending emails via the sendEmail method on StackServerApp.

Table of Contents

Recipients

You must provide exactly one of userIds or allUsers.

Content

You must provide exactly one of html, templateId, or draftId.

Options

Usage

Choose a content method (html, templateId, or draftId) and a recipient method (userIds or allUsers):
Provide custom HTML directly:
await stackServerApp.sendEmail({
  userIds: ["user-id-1"],
  subject: "Hello!",
  html: "<h1>Welcome</h1><p>Thanks for signing up!</p>",
});
The notificationCategoryName, themeId, scheduledAt, and variables properties work independently with any content method.