

The Mailtrap integration for Vercel automatically configures the environment variables required for both email sandbox and production sending:
MAILTRAP_API_KEY — your Mailtrap API token (required)
MAILTRAP_USE_SANDBOX — true or false (required)
MAILTRAP_INBOX_ID — your Mailtrap sandbox inbox ID (required when sandbox is enabled)
When MAILTRAP_USE_SANDBOX=true, all emails are safely routed to Mailtrap’s sandbox environment for testing. Switching it to false enables sending emails to real recipients without changing your application code.
Although Mailtrap can be integrated with Vercel manually, the native integration removes setup friction, minimizes configuration mistakes, and makes it easy to follow a reliable testing-to-production email workflow.