Problem
Emails are not being sent from a sandbox or UAT environment. Emails may remain in âRenderedâ status in the email queue, or supplier booking emails do not generate. This commonly occurs after a sandbox refresh or when setting up a new sandbox.
What We Found
By default, email sending is disabled in sandbox environments to prevent accidental emails to real customers. The âEnable Emails in Sandboxâ setting in App Settings must be explicitly enabled for emails to be sent from non-production environments.
Solution
- Navigate to Setup > Custom Settings
- Find âApp Settingsâ in the list and click âManageâ
- Click âEditâ on the App Settings record
- Check the box for âEnable Emails in Sandboxâ
- Click âSaveâ
- Test by sending a new email - it should now send successfully
Notes
- This setting is automatically reset to unchecked after a sandbox refresh from production
- Setting âEnable Emails in Sandboxâ to true does NOT automatically send previously rendered emails that are queued
- Previously rendered emails will be sent when a new email is triggered, unless âDisable Asynchronous Emailsâ is also set to true
- To prevent queued emails from sending to real addresses, consider running the GlobalDataScrubberBatch to replace email addresses with âexample@example.comâ
- Alternatively, update Email Queue records in âRenderedâ status by setting Status Id to a number greater than 4 to prevent them from being picked up
Warnings
â ď¸ Be cautious when enabling emails in sandbox if there are many âRenderedâ emails in the queue - they may be sent to real recipients when the next email is triggered â ď¸ If testing in sandbox with production data, scrub email addresses first to avoid sending test emails to real customers
Source: KHELP-12292