Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.shipfastai.dev/llms.txt

Use this file to discover all available pages before exploring further.

Shipfastai sends transactional emails through Resend — a developer-focused email API. Emails are optional: if you leave RESEND_API_KEY unset, the application starts normally and logs a warning instead of sending. This makes local development easier because you can register and verify accounts without a real email provider.

Resend setup

To enable email sending, create a free Resend account at resend.com, then add your API key and sender address to .env:
.env
RESEND_API_KEY=re_xxxxxxxxxxxxxxxxxxxx
FROM_EMAIL=noreply@yourdomain.com
VariableRequiredDescription
RESEND_API_KEYNoYour Resend API key. Starts with re_. Leave empty to disable email.
FROM_EMAILNoThe sender address shown in all outgoing emails. Must be a verified domain in Resend.
Resend’s free tier allows 3,000 emails per month and up to 100 emails per day. This is more than enough for development and early-stage production use.

Email types sent

Shipfastai sends three types of transactional emails automatically:
TriggerEmail sentDescription
User registersVerification emailContains a link to {FRONTEND_URL}/verify-email?token=…. The token expires after VERIFICATION_TOKEN_EXPIRE_HOURS (default: 24 hours).
User verifies emailWelcome emailSent immediately after successful verification. Includes a link to the dashboard.
User requests password resetPassword reset emailContains a link to {FRONTEND_URL}/reset-password?token=…. The token expires after PASSWORD_RESET_TOKEN_EXPIRE_HOURS (default: 1 hour).
The FRONTEND_URL variable controls the base URL used in all email links. Make sure it matches your deployed frontend address in production.

Customizing email templates

Email templates are defined in backend/app/core/email.py as inline HTML strings inside three methods on the EmailService class:
MethodEmail
send_verification_emailVerification email
send_welcome_emailWelcome email
send_password_reset_emailPassword reset email
To customize a template, open backend/app/core/email.py and edit the html variable inside the corresponding method. The templates are plain HTML strings — you can replace them with any HTML you like, including full branded designs. For example, to change the verification email subject line:
backend/app/core/email.py
return self._send(to_email, "Confirm your account - MyApp", html)
If you want to use a templating library like Jinja2, install it and render the template before passing the resulting HTML string to self._send.

Testing locally

You have two options for testing email flows during local development: Option 1: Leave RESEND_API_KEY empty (recommended) When RESEND_API_KEY is not set, the EmailService logs the would-be email to the console instead of sending it. You can still test the full registration flow — check the backend logs to see the verification token URL.
WARNING  Email not configured (missing RESEND_API_KEY). Would have sent to=user@example.com subject=Verify your email - Shipfastai
Option 2: Use a Resend test API key Resend supports sending emails to your own verified address using a real API key in test mode. Add your re_ key to .env and set FROM_EMAIL to your verified sender.
.env
RESEND_API_KEY=re_your_real_key
FROM_EMAIL=you@yourdomain.com