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

1 Answer 1

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? Commented Aug 31, 2017 at 5:57
  • 1
    @KiranMachhewar no. More like they collide in odd ways at times
    – Eric
    Commented Aug 31, 2017 at 11:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .