start command runs the production version of the preview app that was built using the build command.
Usage
Prerequisites
Before runningemail start, you must first build the preview app:
.react-email directory with the production-ready preview app.
How It Works
When you runemail start, the CLI:
- Checks that the
.react-emaildirectory exists - Runs
next starton the built application - Starts a production server (default port: 3000)
- Serves your email templates with optimal performance
Example Workflow
Complete workflow for production preview:Default Port
By default, the preview app starts on port 3000. The port is configured during the build process. To use a different port, you can set it in Next.js configuration before building, or use Next.js CLI directly:Production vs Development
Development Server (email dev)
- Hot reloading enabled
- Slower initial load
- Real-time file watching
- Development mode
- Best for active development
Production Server (email start)
- No hot reloading
- Optimized performance
- Pre-rendered static pages
- Production mode
- Best for demos and deployment
Use Cases
Local Preview
Preview the production build locally before deploying:Sharing with Team
Share a production-quality preview with your team:- Build the app:
email build - Start the server:
email start - Share the URL:
http://localhost:3000
QA Testing
Use the production build for quality assurance:Stopping the Server
To stop the server, pressCtrl+C in the terminal.
The CLI handles graceful shutdown:
- Ongoing requests complete
- Server processes are cleaned up
- Port is released
Deployment
For actual deployment, you have several options:Deploy to Vercel
Deploy to Netlify
Self-Hosted
Run the production server on your own infrastructure:Docker
Create a Docker image:Environment Variables
The production server uses environment variables configured during build:REACT_EMAIL_INTERNAL_EMAILS_DIR_ABSOLUTE_PATH- Absolute path to email templatesREACT_EMAIL_INTERNAL_EMAILS_DIR_RELATIVE_PATH- Relative path to email templatesREACT_EMAIL_INTERNAL_PREVIEW_SERVER_LOCATION- Location of preview server filesREACT_EMAIL_INTERNAL_USER_PROJECT_LOCATION- User’s project root
email build and don’t need manual configuration.
Troubleshooting
Directory Not Found
If you see “Could not find .react-email”:Port Already in Use
If port 3000 is occupied:Stale Build
If changes aren’t reflected:- Stop the server (
Ctrl+C) - Rebuild:
email build - Restart:
email start
Performance Issues
For better performance:- Ensure you’re using the latest Node.js LTS version
- Check that the build completed successfully
- Monitor server resources (CPU, memory)
Next Steps
Build Command
Learn about building the preview app
Export Templates
Export templates as static HTML files