Skip to main content

Email & Notifications

Transactional emails DirectoryLaunch sends via Resend — welcome, submissions, payments — plus outbound Discord and Slack notification webhooks.

DirectoryLaunch sends transactional emails via Resend. All templates are React components (from @react-email/render) — edit them in your IDE with live preview.

Emails the site sends

EventRecipientTrigger
WelcomeNew signupUser signs up
Submission receivedSubmitterUser submits a project
Submission approvedSubmitterAdmin clicks Approve
Submission rejectedSubmitterAdmin clicks Reject
New submissionAdminA project is submitted
Payment receiptBuyerStripe checkout.session.completed
Account notificationUserCron-scheduled reminders
Newsletter subscribedNew subscriber/api/newsletter/subscribe

Previewing a template

Where templates live

lib/email.ts builds each email. Style tweaks (colors, logo, signature) happen there or through siteConfig / emailConfig.

External webhooks (optional)

On top of email, DirectoryLaunch can fire outbound webhooks to Discord/Slack when events happen. Controlled by the webhooksExternal flag.

Configure in the admin panel → Settings → Integrations (stored in DB). Events currently emitted:

  • project.submitted
  • project.approved
  • project.rejected
  • user.registered

In code:

import { webhookEvents } from '@/lib/webhooks';
 
await webhookEvents.projectSubmitted(project);

Configuration

See Email Config for the full Resend setup (API key, domain verification, dev redirect).

Dev-safety: redirecting emails locally

When NODE_ENV=development and RESEND_DEV_REDIRECT=true (default), every email is redirected to RESEND_DEV_REDIRECT_TO. This prevents accidents where testing sends real emails to users.

Set it once in .env.local:

RESEND_DEV_REDIRECT=true
RESEND_DEV_REDIRECT_TO=you@example.com