Send Email
Learn how to send emails programmatically.
import { sendEmail, MagicLink } from "@package/email";
await sendEmail({
to: "user@example.com",
subject: "Sign in to your account",
react: <MagicLink url={magicLinkUrl} />,
});API Reference
| Property | Description |
|---|---|
from | Optional, defaults to APP_NAME <RESEND_FROM_EMAIL> |
to | Recipient email address. |
subject | Email subject line. |
react | React Email template component. |
@package/email is a server-only package. Never import it in client components or "use client" files.