function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Big EarsBig Ears 

Sandboxes, Unit testing & NO_MASS_MAIL_PERMISSION

I know that sandboxes are now generated with "System Email Only" setting for Email Deliverability. However, this immediately breaks a whole bunch of unit tests.

Has anybody found a workaround for this, other than just changing "Email Deliverability" straight back to "All"? Seems like a bit of an oversight by Salesforce here not to excempt test code from those settings.
PatlatusPatlatus

+1.

 

Have to modify this manually after each refresh

Big EarsBig Ears
This is such a shame - It completely undoes the benefit of having the "System Email Only" setting....
PatlatusPatlatus

Agree. Besides of that, we have to manually reconnect full sandboxes of two organizations after each refresh. It is also big pain because it is not allowed to do by code execution.

And cancelling\rescheduling schedulable jobs on each deployment is also a big pain.

Salesforce has many such "benefits".