1

I have a test method where I am getting SINGLE_EMAIL_LIMIT_EXCEEDED error. As per my understanding org email limits should not have any impact on test class executions or test classes should not consume any email limits.

Is there any documentation suggesting that emails sent in test context will consume single email message limits?

0
3

As answered in this duplicate:

SINGLE_EMAIL_LIMIT_EXCEEDED. What does it mean?

In the comments by SFDCFOX

That, though, is true. The moral of the story is that you should prefer unit testing over manual testing whenever possible, although when you are manually testing, I would definitely agree that you should be commenting out any sendEmail functions unless you're specifically testing deliverability/how the email looks

Basically, if your org has exceeded the limit outside of the tests, it will trigger that error during tests. If you are under your limit outside of the test context then the test will not trigger that error.

2
  • so it means test context and normal context are shared in terms of single email message limit right? – Kiran Machhewar Aug 31 '17 at 5:57
  • 1
    @KiranMachhewar no. More like they collide in odd ways at times – Eric Aug 31 '17 at 11:18

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.