Skip to Content
Get StartedEmail Provider Setup

📧 Setting Up an Email Provider

Your app uses an email provider to send team invitations, contact form messages, and other transactional emails.

The default configuration uses Resend , but you can easily replace it with another provider such as SendGrid, Postmark, or Mailgun.

1. Setting Up Resend

To use Resend, follow these simple steps:

  1. Go to https://resend.com .
  2. Click Get started.
  3. You can log in with your preferred method (GitHub, Google, or email).
  4. Once you’re in the dashboard, navigate to API Keys

    or go directly to https://resend.com/api-keys .

  5. Click + Create API Key.
  6. Give it a descriptive name, for example SaaS Kick Starter Dev.
  7. Click Create, then copy the key.

⚠️ Important: You will only see this key once. Store it safely — if you lose it, you’ll need to generate a new one.

2. Update Your .env

Open your .env file and add your Resend API key:

# Resend configuration RESEND_API_KEY="your_resend_api_key_here" # Email sender addresses INVITATION_FROM_EMAIL="Team <onboarding@yourapp.com>" NO_REPLY_EMAIL="no-reply@yourapp.com" # Contact form settings CONTACT_FROM_EMAIL="contact@yourapp.com" CONTACT_RECEIVER_EMAIL="youremail@(gmail or other).com"

⚙️ Using a Different Provider

If you want to replace Resend with another provider:

  • Install the provider’s SDK (e.g., @sendgrid/mail, postmark, nodemailer, etc.).
  • Update emailClient.ts to use the new SDK.
  • Update your .env variable name accordingly (e.g., SENDGRID_API_KEY, POSTMARK_API_KEY, etc.).

By default, the email client is defined in:

[rootFolder]/lib/emails/emailClient.ts

Here’s the default setup using Resend:

import { Resend } from 'resend'; export const emailClient = new Resend(process.env.RESEND_API_KEY!);

⚠️ Note: You may need to adjust the email sending methods to match the new provider’s API. This is relatively straightforward for most providers, as they follow similar patterns for sending emails.

🧩 The rest of your email logic should continue to work as expected.

Last updated on