Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Email sent from ESP sandbox mode, never delivered: how to fix it

DLV-075High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A transactional email provider (ESP) such as SendGrid, Mailgun, Postmark or Amazon SES sends the automatic emails your site produces: lead notifications, order confirmations, password resets. Most ESPs have a sandbox or test mode for developers. In that mode the provider says "OK" to your site but does not deliver the message to the real recipient.

Why it costs you leads or sales

The failure is silent. Your form shows a success message, the ESP API returns a success code, and no error is logged. Meanwhile the lead notification, the customer receipt or the booking confirmation never arrives. You lose leads you never knew you had, and customers think the order failed.

Where the lead disappears
  1. Visitor submits formThank-you page shows
  2. Site calls ESP APIReturns success
  3. ESP in sandbox modeMessage dropped
  4. InboxNothing arrives
  5. CRM follow-upLead never contacted

The site and the ESP both report success, but delivery never happens.

Leads that reach youExample numbers
Leads that reach you (example)Submitted: 40 leads per week; Delivered (sandbox on): 0 leads per week; Delivered (live): 40 leads per week0153140040SubmittedDelivered (sandbox on)Delivered (live)leads per week

Example: 40 form submissions a week, before and after sandbox mode is switched off.

How to check if your site has it

Find out whether sandbox mode is on
  1. Submit a real test

    Fill in your own form with an address on a different domain from your sender, such as a personal webmail account. Wait a few minutes and check inbox and spam.

  2. Open the ESP activity log

    Look at SendGrid Email Activity, Mailgun Logs, or Postmark Activity. A message that was accepted but never shows as delivered points to sandbox or test mode.

  3. Check the ESP settings

    In SendGrid, open Settings > Mail Settings > Sandbox Mode and check it is off. In Mailgun, check whether you are sending from a domain starting with sandbox. In Postmark, check the account approval banner and the server settings.

  4. Check your code and plugin

    Search for a sandbox flag in code, such as mail_settings.sandbox_mode.enable set to true, or an environment variable like MAIL_MODE=test. Check which API key is in use: test or live.

SendGrid request with sandbox mode on (this drops the email)json
{
  "personalizations": [{ "to": [{ "email": "sales@example.com" }] }],
  "from": { "email": "forms@example.com" },
  "subject": "New lead",
  "content": [{ "type": "text/plain", "value": "Test" }],
  "mail_settings": { "sandbox_mode": { "enable": true } }
}

How to fix it

The fix is the same everywhere: send live. Remove the sandbox flag, use the live API key or server token, send from a verified domain, and finish any account approval the ESP asks for. How you do it depends on where the email is sent from.

Switch to live sending by platform
  1. Open your SMTP or mail plugin

    In plugins such as WP Mail SMTP or FluentSMTP, open the mailer settings and check the API key is the live key, not a test one.

  2. Remove test options

    Turn off any sandbox or test option and any domain starting with sandbox. Use a From address on your verified domain.

  3. Send a plugin test email

    Use the plugin's email test tool, then submit your real form.

Finish the setup in your ESP account
  1. Add your own domain

    In Mailgun, add and verify a real sending domain instead of the sandbox one. In SendGrid and Postmark, authenticate your domain or sender signature.

  2. Complete account approval

    If the ESP shows a pending approval, answer its questions so live sending is enabled.

  3. Create a live key if needed

    Generate a production API key, update your site, and delete unused test keys.

Sandbox vs live

Sandbox mode

  • API returns success
  • Message is dropped or held
  • Nothing in the real inbox
  • No error on the site

Live mode

  • API returns success
  • Message is delivered
  • Lead lands in the inbox
  • Activity log shows delivered

How to confirm it's fixed

Confirmation checklist
  • Submit the real form with an outside email address
  • The notification arrives in the inbox, not only spam
  • The ESP activity log shows the message as delivered
  • The customer confirmation email arrives too
  • The lead appears in your CRM if it is connected

How to prevent it happening again

Prevention checklist
  • Keep test and live API keys in separate, clearly named environment variables
  • Never copy staging settings to production without checking the mail config
  • Add a line to your launch checklist: sandbox off, live key set
  • Use a verified domain, not the provider's sandbox domain
  • Test the form end to end after any ESP, plugin or hosting change
How it usually happens
  1. Build

    Developer enables sandbox mode so test emails do not hit real people

  2. Launch

    Site goes live and the flag or test key is copied across

  3. Days later

    Forms look fine but nobody receives leads

  4. Fix

    Sandbox turned off and a live test lead confirms delivery

How FunnelGuard handles this

FunnelGuard detects this issue today. A robot visitor submits your real lead form on a schedule, from the EU or the US, and then checks whether the test lead actually reaches your inbox and CRM. If the form succeeds on the page but the email never arrives, as happens in sandbox mode, the check fails.

Questions people ask

Why are my form emails not being delivered even though the form says success?

The form success message only means your site submitted the request. If your email provider is in sandbox or test mode, it accepts the request and then drops or holds the message. Check the provider's activity log and its sandbox setting.

How do I turn off sandbox mode in SendGrid?

In SendGrid, open Settings > Mail Settings and switch Sandbox Mode off. Also check your code or plugin for a mail_settings.sandbox_mode.enable flag set to true, and remove it.

Why does Mailgun only send to some addresses?

Mailgun's sandbox domain only sends to authorised recipients you add to a list. To send to anyone, add and verify your own domain in Mailgun, then use its DNS records and credentials in your site.

How can I tell if my ESP is in sandbox mode?

Send a test to an address you have not added to the ESP and see whether it arrives. Then read the activity log: messages accepted but never delivered, plus a sandbox or test setting in the account, are the typical signs.

Will sandbox mode show an error on my website?

Usually not. The ESP returns a success response, so your site and form plugin log nothing wrong. That is why the problem can run unnoticed until someone asks where the leads are.

Can a test API key cause the same problem?

Yes. If your site still uses a test key or a test server token, messages may be accepted without being delivered to real recipients. Replace it with the live key and redeploy.

How can I find out quickly when emails stop arriving?

Run a regular end-to-end test that submits your form and checks the email arrives. FunnelGuard does this on a schedule and alerts you when a test lead does not reach the inbox or CRM.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.