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

Email Deliverability Settings via Apex

Hello all, 
   Everytime we refresh a sanbbox, there are many little things that need to be done before we consider it "Ready" for development.  One of those things is to set the Email Deliverability settings to "All Email."  I have a wrote a script that automates all of the other little things and the last piece is to change the email deliverability settings.  I am not sure if that setting is available via the API and wanted to check to see if someone can either slap my hand for trying or point me in the right direction.

So just to recap, I want to set the  Email Deliverability Settings ( using Apex via an anonymous block in the dev console.  
Hi , 

I could not find anything related to Configuring Email Deliverability Setting via API or APEX and I believe this feature is not yet available via Salesforce API. 

Kindly log an Idea with the same so that it will be notified to the Product Management and also be searchable and Votable by other Salesforce users who would like to see the feature in the future releases.

Have you heard anything about this feature yet?  I want to do this also except using a SandboxPostCopy class.
Abhishek Rajput 20Abhishek Rajput 20
Have you found solution for that? I am also looking for same.
Abhishek Rajput 20Abhishek Rajput 20
Hi Rstrunk,

I am also writing a logic to automate the post Refesh Steps. As you have mentioned you have written the script to automate the steps. Can you please advise me how can we automate that. I am trying to do that via Metadata API.
my emaild :

Many Thanks.

Sombir PalitSombir Palit
I dont think even metadata api supports this.