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
@login.ax974@login.ax974 

Email not send on Configuration sandbox

Hi,

I am getting following exception on my configuration sandbox while trying to use sendEmail API to send single email message.

Can you please tell me why and if there is a workaround to this?

SendEmail failed. First exception on row 0; first error: NO_MASS_MAIL_PERMISSION, Single email is not enabled for your organization or profile. Single email must be enabled for you to use this feature.: []

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
Jeff MayJeff May

Double check your Sandbox Email Deliverability options. By Default, they are limited. Check under Admin Setup->Email Administration-> Deliverability.  Also note that user's emails have been changed in the sandbox, so you will have to edit the User record and change the email address in order to actually receive emails if you are using the User fields in your SendMail.

All Answers

Jeff MayJeff May

Double check your Sandbox Email Deliverability options. By Default, they are limited. Check under Admin Setup->Email Administration-> Deliverability.  Also note that user's emails have been changed in the sandbox, so you will have to edit the User record and change the email address in order to actually receive emails if you are using the User fields in your SendMail.

This was selected as the best answer
MattGoncalvesMattGoncalves
Hi @Jeff, is there a way to change that option by using Apex / Metadata API? I'm trying to automate the Post-Sandbox creation process. 

Thanks!