BunshipBunship
Integrations

Email Service

Production email guide for Bunship: current templates, React Email preview workflow, and Resend setup.

Bunship has already wired emails into auth flows. For launch, your core work is:

  • verify Resend sender domain
  • configure environment variables
  • review and brand existing templates
  • run a final end-to-end delivery test

Current Built-In Templates

TemplateTriggerFile
Verify identityEmail verification / magic-link style loginpackages/emails/src/templates/verify-identity.tsx
Request OTPTwo-factor OTP deliverypackages/emails/src/templates/request-send-otp.tsx
Reset passwordPassword reset requestpackages/emails/src/templates/request-reset-password.tsx
Withdrawal status changedAffiliate withdrawal status updatepackages/emails/src/templates/withdrawal-status-changed.tsx
Feedback status updatedTicket status update with reply title and feedback contentpackages/emails/src/templates/feedback-status-updated.tsx

feedback-status-updated supports inserting replyTitle and feedbackContent (and optional replyContent) directly into the email body.

Preview and Export Templates (React Email)

You can now preview and export templates directly from packages/emails.

cd packages/emails
bun run preview

Available scripts:

  • bun run preview: local preview dev server (:3333)
  • bun run preview:build: build preview app
  • bun run preview:start: start built preview app
  • bun run preview:export: export static HTML templates to packages/emails/out

Resend Configuration

1. Verify sender domain in Resend

In the Resend dashboard, add your sending domain and finish DNS setup:

  • SPF
  • DKIM
  • (recommended) DMARC

2. Configure environment variables

RESEND_API_KEY="re_xxx"
EMAIL_FROM="Bunship <noreply@mail.yourdomain.com>"
NEXT_PUBLIC_SITE_URL="https://yourdomain.com"
BETTER_AUTH_URL="https://api.yourdomain.com"

EMAIL_FROM must use the verified sender domain.

3. Validate auth email flow

  1. Sign up and verify email
  2. Trigger reset password
  3. Trigger OTP login (if enabled)
  4. Confirm links and language are correct in both EN and ZH

Launch Checklist

  1. Sender domain is fully verified in Resend.
  2. EMAIL_FROM uses your production domain.
  3. Auth links in email point to production URLs.
  4. Templates are updated with your brand/support links.
  5. Delivery, spam rate, and failure logs are monitored.

Current Template Screenshots

The screenshots below are generated from exported React Email templates.

Verify identity template

OTP template

Reset password template

Withdrawal status template

Next Steps