Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Transactional email via Resend with typed templates.
@latimer-woods-tech/errors
@latimer-woods-tech/logger
npm install @latimer-woods-tech/email
wrangler secret put RESEND_API_KEY
sendEmail(opts)
function sendEmail(opts: { apiKey: string; from: string; to: string | string[]; subject: string; html: string; text?: string; replyTo?: string; tags?: Record<string, string>; }): Promise<{ id: string }>;
renderTemplate(template, data)
function renderTemplate( template: EmailTemplate, data: Record<string, unknown>, ): { subject: string; html: string; text: string };
welcome
subscription-created
subscription-canceled
trial-ending
password-reset
import { sendEmail, renderTemplate } from '@latimer-woods-tech/email'; const { subject, html, text } = renderTemplate('welcome', { firstName: 'Jane', appName: 'FocusBro', loginUrl: 'https://focusbro.app/login', }); await sendEmail({ apiKey: env.RESEND_API_KEY, from: 'hello@focusbro.app', to: user.email, subject, html, text, });