Welcome

Add pre-built welcome email templates to send when a user registers, welcoming them.

Prerequisites

Make sure you have Resend integration installed & add the database hook to your configuration.

code-editor
pnpm dlx shadcn@latest add @auth-cn/resend

Check 3rd-party/resend docs for more information.

code-editor

lib/auth.ts

import { betterAuth } from "better-auth";
// Your email template...
import { WelcomeEmail } from "@/emails/vercel-welcome";
// Check https://auth.uprizing.me/docs/3rd-party/resend
import { sendEmail } from "@/lib/resend";

export const auth = betterAuth({
  // Your auth configuration...
  databaseHooks: {
    user: {
      create: {
        after: async (user) => {
          sendEmail({
            from: "Acme <onboarding@resend.dev>",
            to: user.email,
            subject: "Welcome to Our Service!",
            // Provide user name and email.
            react: WelcomeEmail({ name: user.name, email: user.email }),
          });
        },
      },
    },
  },
});

Add the database hook to send welcome email.

Vercel

Email template integrated with Vercel branding.

test
code-editor
pnpm dlx shadcn@latest add @auth-cn/email-Vercel-welcome

Add template

Linear

Email template integrated with Linear branding.

test
code-editor
pnpm dlx shadcn@latest add @auth-cn/email-linear-welcome

Add template

Raycast

Email template integrated with Raycast branding.

test
code-editor
pnpm dlx shadcn@latest add @auth-cn/email-raycast-welcome

Add template

Notion

Email template integrated with Notion branding.

test
code-editor
pnpm dlx shadcn@latest add @auth-cn/email-notion-welcome

Add template

Slack

Email template integrated with Slack branding.

test
code-editor
pnpm dlx shadcn@latest add @auth-cn/email-slack-welcome

Add template

Stripe

Email template integrated with Stripe branding.

test
code-editor
pnpm dlx shadcn@latest add @auth-cn/email-stripe-welcome

Add template