Sandbox Mode
Test your email integration without sending real emails.
Overview
Sandbox mode lets you test your email integration in development and staging environments without actually delivering emails. Emails sent with a sandbox API key are fully processed and logged in your dashboard, but never leave our servers.
Perfect for CI/CD: Run your test suite with real API calls without worrying about sending emails to actual recipients.
Creating a Sandbox API Key
-
1
Go to API Keys
Navigate to the API Keys section in your dashboard.
-
2
Create new key
Click "Create API Key" and give it a descriptive name like "Staging" or "Development".
-
3
Enable sandbox mode
Check the "Sandbox" checkbox before creating the key.
-
4
Copy your key
Copy the API key immediately—it won't be shown again.
How It Works
When you send an email using a sandbox API key:
- The email is validated exactly like production (from address, domain verification, etc.)
- The email is stored and visible in your dashboard
- The delivery is marked as successful immediately
- No email is actually sent—recipients never receive anything
Identifying Sandbox Emails
Sandbox emails are clearly marked in your dashboard with a yellow "Sandbox" badge. The delivery status will show "Sandbox (not actually sent)" so you can easily distinguish test emails from production traffic.
Use Cases
Local Development
Test email flows on your local machine without sending real emails or setting up a local mail server.
Staging Environments
Run your staging environment with the real API without accidentally emailing customers.
Automated Testing
Include email-sending code in your test suite with confidence that no emails will be delivered.
Demo Environments
Show email functionality to stakeholders without sending to real addresses.
Best Practices
- Use environment variables to switch between sandbox and production keys based on your environment.
- Name keys clearly like "Production", "Staging", or "CI/CD" so you know which is which.
- Never use production keys in development or staging environments.
Works with SMTP Too
Sandbox mode works identically whether you're using the REST API or SMTP. Simply use your sandbox API key as the SMTP password, and all emails will be logged without delivery.
# Production EML_API_KEY=your_production_key # Staging / Development EML_API_KEY=your_sandbox_key