Codapult
DocsBlogPricingPluginsDemo
Get Codapult
Logo

Build your SaaS with AI. Keep the architecture under control.

Get Codapult

Product

  • Pricing
  • Architecture
  • Modules
  • AI platform
  • Plugins

Developers

  • MCP
  • CLI
  • Documentation
  • Launch your SaaS
  • Build a B2B SaaS

Resources

  • Blog
  • FAQ

Connect

  • Contact
  • GitHub

Compare

  • SaaS template comparison
  • Codapult vs Supastarter
  • Codapult vs Makerkit
  • Codapult vs ShipFast
  • Codapult vs SaaSBold
  • Codapult vs Gravity
  • Codapult vs Nextbase
  • Codapult vs BuilderKit

Featured on

Codapult on LaunchNestCodapult on LaunchNestbetterlaunch.cobetterlaunch.coFeatured on LaunchBuffFeatured on LaunchBuffCodapult on PeerPushCodapult on PeerPushFeatured on LaunchItFeatured on LaunchIt
© 2026 Codapult·All rights reserved·Privacy Policy·Terms of Service
Full source code · One-time purchase · Self-host anywhere
All articles

Getting Started

  • Introduction
  • Quick Start
  • Your First 30 Minutes
  • Project Structure
  • License and Permitted Use
  • Starter Profiles and Recipes
  • Product Recipes

Configuration

  • Environment Variables
  • App Configuration
  • Which Modules Should I Enable?
  • Provider Matrix
  • Capability Coverage

Database

  • Database and Provider Guide
  • Database
  • Migrations

Authentication

  • Authentication
  • OAuth Providers
  • Two-Factor & Passwordless
  • Enterprise SSO (SAML)

Ai

  • AI Runtime Architecture and Evals
  • AI Features
  • Streaming Chat
  • RAG and Semantic Search
  • Quotas and Memory

Teams

  • Teams & Organizations
  • Permissions & RBAC
  • SCIM Provisioning

Security

  • Data Retention Policy
  • Security

Deployment

  • Enterprise E2E Evidence
  • Enterprise Production Readiness
  • Deployment, Backup, and Restore Runbook
  • Deployment
  • Troubleshooting

Payments

  • Payments & Billing
  • Stripe Setup
  • LemonSqueezy Setup
  • Polar Setup
  • Payment Webhooks

Api

  • API Layer
  • tRPC
  • GraphQL

Email

  • Email
  • Email Templates

Infrastructure

  • Infrastructure
  • Self-Hosting
  • File Storage
  • Docker
  • Background Jobs
  • Terraform & Pulumi
  • Kubernetes

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture
  • Waitlist
  • Audit Log
  • White-Labeling
  • Workflow Automation
  • A/B Testing
  • Welcome Page
  • Referrals
  • GDPR Export and Deletion
  • Promotions
  • Outgoing Webhooks

Plugins

  • Plugin System
  • CRM Plugin
  • Helpdesk Plugin
  • Email Marketing Plugin

Upgrading

  • Upgrading Codapult

Developer Tools

  • AI Agents & IDEs
  • MCP Server
  • Testing
  • Build Your First Feature with Codapult MCP
  • How Guard Blocks an Architectural Regression
Email

Email Templates

Create and customize Codapult transactional email templates with React Email components, shared layouts, previews, localization, and Resend delivery.

Email templates live in src/lib/email/templates/ and are React components built with the react-email package.

Existing Templates

TemplateDescription
BaseLayout.tsxShared layout wrapper (header, footer, brand name)
WelcomeEmail.tsxNew user welcome email
BillingEmail.tsxBilling and subscription notifications
ResetPasswordEmail.tsxPassword reset link
InvitationEmail.tsxTeam invitation email

BaseLayout

The BaseLayout component provides consistent structure across all emails:

  • App name in the header (reads from appConfig.appName via src/config/app.ts, populated from NEXT_PUBLIC_APP_NAME)
  • Centered container with max width of 600px
  • Footer with copyright notice
  • Preview text for email client snippets

All templates should wrap their content in <BaseLayout>.

Creating a New Template

1. Create the file

touch src/lib/email/templates/NotificationEmail.tsx

2. Define the component

import { Button, Heading, Section, Text } from 'react-email';
import { BaseLayout } from './BaseLayout';

interface NotificationEmailProps {
  userName: string;
  message: string;
  actionUrl: string;
}

export function NotificationEmail({ userName, message, actionUrl }: NotificationEmailProps) {
  return (
    <BaseLayout preview={`New notification for ${userName}`}>
      <Heading style={{ fontSize: '24px', fontWeight: '700', color: '#111' }}>
        Hi {userName},
      </Heading>
      <Text style={{ fontSize: '16px', color: '#555', lineHeight: '1.6' }}>{message}</Text>
      <Section style={{ textAlign: 'center', margin: '24px 0' }}>
        <Button
          style={{
            backgroundColor: '#111',
            borderRadius: '8px',
            color: '#fff',
            fontSize: '16px',
            fontWeight: '600',
            padding: '12px 24px',
          }}
          href={actionUrl}
        >
          View Details
        </Button>
      </Section>
    </BaseLayout>
  );
}

3. Send the email

import { render } from 'react-email';
import { enqueueEmail } from '@/lib/jobs';
import { NotificationEmail } from '@/lib/email/templates/NotificationEmail';

const html = await render(
  <NotificationEmail
    userName="Jane"
    message="Your deployment is complete."
    actionUrl="https://app.example.com/deployments/42"
  />,
);

await enqueueEmail('jane@example.com', 'Deployment complete', html);

Styling Rules

Email clients do not support CSS classes or external stylesheets. Follow these rules:

  • Use inline React.CSSProperties objects for all styling
  • Keep fonts to web-safe families (Arial, Helvetica, Georgia)
  • Use table-based layouts for complex structures (react-email components handle this internally)
  • Test in multiple email clients — Gmail, Outlook, and Apple Mail render differently

Available Components

Import from react-email:

ComponentDescription
HtmlRoot <html> element
Head<head> for meta tags
Body<body> with base styling
ContainerCentered max-width wrapper
Section<table> section for layout
RowTable row
ColumnTable column
Text<p> with email-safe defaults
Heading<h1>–<h6>
ButtonCTA button with link
Link<a> link
Img<img> with alt text
HrHorizontal rule
PreviewHidden preview text for email clients

For the full component API, see the React Email documentation.

EmailInfrastructure