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
ruehawkruehawk 

Salesforce Internal Error - Email

I did a refresh of my sandbox yesterday and re-applied code that was working in the sandbox previously.

It was probably 6 months since the previous refresh.

 

This statement  then caused an "Internal Salesforce Error".

Messaging.reserveSingleEmailCapacity(1);

 

So, I tried Execute Anonymous in my SANDBOX - Messaging.reserveSingleEmailCapacity(1); -  And it gives me an "Internal Error".

 

I try this statement using Execute Anonymous in Production and it works.

The issue is not the code, but the environment.

 

Sandbox is in CS3 instance.

Production is  NA5 instance.

 

Any ideas?

 

Rudy

 

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
ruehawkruehawk

Found the issue.

 

I needed to select "All Email" in the Email Administration - Deliverability section of setup.