VibeKit
Email

Email Providers

Connect your preferred email delivery service without changing a single template.

VibeKit decouples your email templates from the underlying delivery service. You can start sending emails locally through the console trap, launch on Resend or Postmark, and scale to Amazon SES or custom SMTP servers later without modifying any product templates or business logic.

Seamless Provider Switching

All email delivery is unified through a standard transport adapter. You switch providers by changing the MAIL_PROVIDER environment variable in your .env file:

# Choose your email provider
MAIL_PROVIDER=resend
EMAIL_FROM=[email protected]

Your React Email templates and application calls to sendEmail remain identical regardless of which provider handles the actual transport.

Production Delivery Services

VibeKit includes pre-built adapters for leading transactional email services:

ProviderRecommended ForSetup Key Features
ResendFast modern developer setup and seamless React Email support.Requires RESEND_API_KEY. Native webhooks and analytics.
PostmarkUnrivaled transactional inbox delivery and detailed spam analysis.Requires POSTMARK_SERVER_TOKEN. Dedicated transactional streams.
Amazon SESHigh-volume sending at the lowest per-message pricing.Requires AWS credentials and verified SES identity.
SendGridEnterprise infrastructure with extensive IP pool options.Requires SENDGRID_API_KEY.
PlunkOpen-source friendly and lightweight transactional delivery.Requires PLUNK_API_KEY.
SMTP / NodemailerSelf-hosted mail servers, Mailgun, or private enterprise relays.Standard host, port, user, and password configuration.
Console TrapLocal development and automated testing (MOCK_SERVICES=true).Zero external network calls; logs messages cleanly to stdout.

Domain Verification and Deliverability

Modern mail providers require authenticated domain records before delivering messages to real inboxes. To ensure your transactional emails do not land in spam folders:

  1. Verify Your Sending Domain: Add the DNS records provided by your email service (such as Resend or Postmark) to your domain registrar.
  2. Configure SPF and DKIM: Authorize the email service to sign messages on behalf of your domain name.
  3. Set Up DMARC: Publish a DMARC policy on your domain root to protect your sender reputation from spoofing.
  4. Match the Sender Address: Ensure the EMAIL_FROM address in your environment variables exactly matches the domain verified in your provider dashboard.

Fail-Closed Production Safeguards

Silent delivery failures lead to frustrated users who never receive password reset or verification codes. VibeKit enforces strict delivery safeguards:

  • No Silent Drops: If a real email provider is configured but credentials are missing or rejected, VibeKit fails with a descriptive error instead of pretending the message was sent.
  • Sandbox Isolation: The console trap only activates when MOCK_SERVICES=true or MAIL_PROVIDER=console. Production environments reject unverified sandbox modes to prevent accidental live misconfigurations.
  • Delivery Acceptance vs Receipt: VibeKit checks that the provider explicitly accepts each message and logs the remote message ID for tracking.

Directing Your Agent to Wire Up Mail Transports

Instruct your coding agent to configure an email provider using VibeKit's built-in provider setup patterns:

Configure Resend as our primary email provider.
Update our environment documentation to require 'RESEND_API_KEY' and 'EMAIL_FROM'.
Set up the transport adapter in 'packages/mail/provider/index.ts'.
Send a test verification email locally to confirm that the provider contract matches before production deployment.

On this page