0

System.resetpassword(Id iduser, true) - This method throws exception & the outbound email not sent when executed from post sandbox refresh apex class.

System.UnexpectedException: UNKNOWN_EXCEPTION: An unexpected error occurred.

0

Each time you refresh a Sandbox all User email addresses are modified to use an example domain. You have to update the email address to send email.

https://help.salesforce.com/HTViewSolution?id=000193090&language=en_US

1
  • Thanks Saroj! During Sandbox refresh, Is it possible to update email deliverability via apex class? so that I can use that apex class to execute after sandbox refresh.
    – Logesh9788
    Jul 5 '16 at 18:05
0

You can also check Email deliverability which is usually reset on Sandbox refresh. Check and make sure it's set to "All email". Refer below link for more details

https://help.salesforce.com/HTViewHelpDoc?id=emailadmin_deliverability.htm

2
  • Thanks Anshul! During Sandbox refresh, Is it possible to update email deliverability via apex class? so that I can use that apex class to execute after sandbox refresh.
    – Logesh9788
    Jul 5 '16 at 18:08
  • @Logesh9788: I don't think there is any way to programmaticaly set that value.
    – Anshul
    Jul 6 '16 at 18:59
-1

As of now, there is no option available in salesforce to programmatically update email deliverability settings. Salesforce support team confirmed the same. Contact Salesforce support team for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.