Codapult
料金プラグインドキュメント
Codapult

開発者のためのSaaSボイラープレート

プロダクト

  • 料金
  • プラグイン
  • ドキュメント

会社情報

  • お問い合わせ
  • GitHub

法的情報

  • プライバシーポリシー
  • 利用規約

© 2026 Codapult. All rights reserved.

全記事

Getting Started

  • Introduction
  • Quick Start
  • Project Structure

Configuration

  • Environment Variables
  • App Configuration

Authentication

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

Database

  • Database
  • Migrations

Teams

  • Teams & Organizations
  • Permissions & RBAC

Payments

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

Api

  • API Layer
  • tRPC
  • GraphQL

Ai

  • AI Features

Email

  • Email
  • Email Templates

Infrastructure

  • Infrastructure
  • File Storage
  • Background Jobs

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Security

  • Security

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture

Plugins

  • Plugin System
  • AI Kit Plugin
  • CRM Plugin
  • Helpdesk Plugin
  • Email Marketing Plugin

Deployment

  • Deployment
  • Troubleshooting

Upgrading

  • Upgrading Codapult

Developer Tools

  • MCP Server
  • Testing
Email

Email

Transactional email with Resend, React Email templates, and custom domain management.

Codapult uses Resend for transactional email delivery and React Email for composable, type-safe email templates. Emails are sent through the background job system for reliability and non-blocking performance.

Setup

Set these environment variables in .env.local:

VariableDescription
RESEND_API_KEYYour Resend API key from resend.com/api-keys
EMAIL_FROMDefault sender address (e.g. Your App <[email protected]>)

Sending Email

Use the enqueueEmail helper from @/lib/jobs to send emails via the background job system:

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

const html = await render(
  <WelcomeEmail userName="Jane" dashboardUrl="https://app.example.com/dashboard" />,
);

await enqueueEmail('[email protected]', 'Welcome to the team!', html);

The enqueueEmail function accepts three arguments — to, subject, and html — and dispatches a send-email background job that delivers via Resend.

Templates

Email templates live in src/lib/email/templates/ and are React components built with @react-email/components. Five templates are included out of the box (Welcome, Billing, Reset Password, Invitation, and a shared BaseLayout).

For creating new templates, the component API, and styling rules, see the dedicated Email Templates page.

Custom Sending Domains

Codapult integrates with the Resend Domains API to let you verify and manage custom sending domains directly from the admin panel.

Admin Panel

Navigate to Admin → Email Domains to:

  • Add a new sending domain
  • View DNS records required for verification (SPF, DKIM, DMARC)
  • Check verification status
  • Remove a domain

How It Works

  1. Add your domain in the admin panel
  2. Resend returns the required DNS records
  3. Add the DNS records to your domain provider
  4. Resend verifies the records automatically
  5. Start sending from @yourdomain.com addresses

Development Without Resend

When RESEND_API_KEY is not set, all email sending is skipped — the enqueueEmail function logs the email details to the console instead of sending. This lets you develop and test without a Resend account.

To test actual email delivery locally, sign up for a free Resend account and use the provided API key. The free tier allows 100 emails/day.

Bounce Handling

Resend handles bounces and complaints automatically. You can configure bounce webhooks in the Resend dashboard to receive notifications when emails bounce or are marked as spam. Codapult does not include built-in bounce handling logic — implement it based on your product's needs (e.g. disable email notifications for bouncing addresses).

Removing the Module

Email is a removable module. Use the setup wizard (npx @codapult/cli setup) to strip it, or see the Modules documentation for manual removal steps. If removed, any code that calls enqueueEmail must be updated or removed as well.

AI FeaturesEmail Templates