Salesforce sandbox email deliverability controls how many outbound emails a sandbox org can actually send, but they do nothing to stop a test flow from addressing a real customer in the first place. The setting that matters most, Email Deliverability under Setup, only decides whether a message leaves the org. If your sandbox still holds unmasked production email addresses, every automated process that generates an email, from a password reset to a quote approval notice, has a live target waiting for it. Masking those addresses before refresh is the only control that removes the target entirely.

Most admins treat email deliverability as a solved problem because they remember setting it to System Email Only during the last org build. That memory is doing a lot of unearned work.

The deliverability setting most admins forget to check

Salesforce gives you three deliverability options: No Access, System Email Only, and All Email. Sandboxes created fresh often default to No Access or System Email Only, which blocks user-triggered and workflow emails. That sounds safe until someone on the team needs to test an actual email alert, flips it to All Email for a sprint, and forgets to flip it back.

I have seen this exact sequence cause a support team to receive three hundred duplicate case-closed notifications during a QA cycle, all addressed to real customer inboxes pulled straight from production data. Nobody changed anything maliciously. Someone just needed to verify a template rendered correctly, and the sandbox still had real people's names attached to real people's emails.

The setting is a switch, not a wall. It depends entirely on a human remembering to flip it back after every testing window, across every sandbox, every single refresh cycle. Relying on a setting that requires perfect human memory is not a control. It is a hope.

What happens when test data carries real emails

Picture a Full sandbox refreshed overnight for a release test. The automation team runs a batch Apex job to simulate thousands of opportunity updates, which triggers a workflow email to the opportunity owner and, in many orgs, a notification to the associated contact. If deliverability is set to All Email, even briefly, those contacts get real emails referencing data that may be stale, inaccurate, or simply embarrassing to send twice.

Marketing Cloud connected orgs raise the stakes further. A sandbox sync that fires a journey because a contact record moved stages can trigger an actual marketing email to a real subscriber, from a test environment, with test content that was never meant to leave the sandbox. That is not a hypothetical edge case. It is a documented failure mode wherever Salesforce and Marketing Cloud share contact data across environments.

Email-to-case setups add another layer. If a sandbox retains real case email threads, a reply triggered during testing can land in a live support queue tied to a real email alias, confusing agents and customers alike. None of this requires a bug. It only requires real PII sitting where test data should be.

Why masking email fields is the actual fix

Email deliverability settings answer the question "can this org send mail right now." Masking answers a different and more durable question: "does this org even know a real email address exists." Once email fields on Contact, Lead, User, and any custom object holding an address are replaced with realistic but fake values, deliverability settings become a secondary safety net rather than the only line of defense.

A masking policy that generates deterministic fake emails, something like firstname.lastname@maskezee-test.com, keeps the data format valid for validation rules and Apex tests while making it structurally impossible for a message to reach a real inbox. Deterministic generation also matters for support workflows: the same contact gets the same fake email across every sandbox refresh, so QA scripts and saved test scenarios do not break every time data refreshes.

This is the point where teams sometimes push back, arguing that System Email Only is sufficient because it blocks workflow and process builder emails from reaching external addresses. That is true for a narrow set of trigger types. It does nothing for outbound integrations, Marketing Cloud journeys, middleware that reads Salesforce data and sends its own emails independently, or custom Apex callouts that hit a third-party email API directly. Masking covers all of those paths because the address itself is gone, not just one delivery channel.

Building email masking into the refresh pipeline

Treating email masking as a manual cleanup step after refresh guarantees it eventually gets skipped. The reliable pattern is to run masking as part of the same automated job that performs the refresh, before any sandbox user or integration gets access to the new copy.

A workable sequence looks like this:

That locking step matters more than people expect. A sandbox that is technically refreshed but not yet masked is briefly the most exposed version of your org, because it has full production data and no masking applied. Automating the gap between refresh and masking down to minutes, rather than hours, closes the window attackers and accidental triggers both rely on.

Edge cases that trip up partial masking policies

Email masking sounds simple until you account for every place an address can hide. User records often carry a personal email in a custom field separate from the standard Email field, especially in orgs that integrated SSO years ago and never cleaned up the legacy field. Masking only the standard field leaves the legacy one exposed.

Chatter posts, case comments, and email-to-case message bodies frequently contain pasted email addresses in free text, which a field-level masking tool will not touch. Report snapshots and list views exported as CSV before a refresh can also retain cached copies of real addresses that outlive the masking job entirely.

Here is a quick reference for where email addresses commonly survive a shallow masking pass:

LocationWhy it gets missed
Custom User fields (legacy SSO, personal contact)Not part of standard masking templates
Long text areas and case commentsFree text, not a dedicated email field type
Marketing Cloud synced data extensionsLives outside the Salesforce org entirely
Cached report exports and dashboardsCreated before masking ran, never refreshed
Chatter feed items and attachmentsNot scanned by field-level masking rules

A masking policy that only targets the obvious fields will pass a quick audit and still leak real data through one of these paths. Worth noting too: Experience Cloud portal users often have separate login emails from their Contact record email, and both need coverage or a password reset test will land in a real inbox.

Setting deliverability correctly as a backstop

Masking should be the primary control, but there is no reason to skip the deliverability setting as a second layer. System Email Only is the right default for almost every non-production org, since it still allows internal testers to receive password resets and verification codes addressed to their own real accounts while blocking everything else.

No Access is appropriate for sandboxes used purely for development or data work, where no one needs to receive test emails at all. All Email should never be a standing configuration outside of production. If a team needs it temporarily to verify a template, set a calendar reminder to revert it the same day, and log the change somewhere other people can see.

The combination of masked email addresses and a conservative deliverability default gives you two independent controls instead of one fragile setting. Even if someone forgets to revert deliverability, masked data means there is no real inbox on the other end to receive the mistake.

Frequently Asked Questions

Does setting sandbox email deliverability to System Email Only make masking unnecessary?

No. System Email Only blocks workflow and process builder emails from reaching external addresses, but it does nothing to stop integrations, Marketing Cloud journeys, or custom Apex callouts from sending mail to a real address stored in the sandbox. Masking removes the real address itself, which closes every one of those paths at once rather than just one delivery channel.

Can a sandbox send real emails even with deliverability set to No Access?

Standard Salesforce-triggered emails are blocked under No Access, but external integrations and connected systems like Marketing Cloud can still read contact data from the sandbox and send messages independently of Salesforce's own deliverability setting. That is why masking the underlying email field matters even when deliverability looks locked down.

Where do real email addresses commonly survive a masking job?

Common gaps include custom User fields holding legacy personal emails, free text in case comments or Chatter posts, cached report exports created before the masking run, and Experience Cloud portal login emails that differ from the associated Contact record. A masking policy needs to explicitly cover each of these or real addresses persist after the main job finishes.

Should deterministic or random fake emails be used for masked Salesforce data?

Deterministic masking is usually the better choice for email fields because it generates the same fake address for the same contact across every refresh. This keeps saved test scripts, QA scenarios, and integration tests working consistently instead of breaking every time the sandbox refreshes with newly randomized values.

How quickly after a sandbox refresh should email masking run?

Masking should run immediately after refresh and before any user or integration gets access to the org, ideally as an automated step in the same pipeline. The period between a completed refresh and a completed masking job is when the sandbox holds full production data with no protection, so minimizing that window matters as much as the masking policy itself.