0

Working in SFDX with a scratch org.

I'm setting up a future method to send an email if it fails, trying to get the formatting right, and testing. Now, I've hit a wall:

SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded: []

Can we do anything to avoid hitting that limit with a scratch org?


UPDATE: what I ended up doing was putting the email bit in a try/catch, with the catch generating a System.debug. That doesn't really help with the formatting, based on how the email I receive actually looks, but it does let me keep testing. Plus, it's probably a smart bit of exception handling that I needed anyway.

  • Create a new scratch org when you are about to?! They are supposed to be utterly disposable, so if you do your development work on your local system and always push the updates to the org you know you have everything you need to re-create the scratch org as you want it... – Phil W Jul 7 at 20:49
  • I have an extensive app that takes a while to set up in a new scratch org. Not a workable solution for me. – PatMcClellan__c Jul 7 at 20:50
  • It does take a while, but the delay is likely less than waiting 24 hours for your limits to be reset. Right? For instance, it takes about 8 minutes to push our managed package content to a scratch org and a couple of minutes to create the scratch org in the first place, but we are only looking at 10-12 minutes elapsed time most of the time. – Phil W Jul 7 at 20:53
  • Takes me about an hour to get things set up. Extensive program, set up REST site, populate data, generate some application records... – PatMcClellan__c Jul 7 at 20:54
  • Ah, yes, we don't bother to set up communities and the like on our scratch orgs - if we want to do anything with those we use a dev org (and simply do a force:mdapi:deploy to push everything to that sort of org to get it up-to-date). – Phil W Jul 7 at 21:10

Your Answer

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

Browse other questions tagged or ask your own question.