1

At the moment I am testing an email function that I am developing but suddenly I am now getting this error:

Messaging.reserveSingleEmailCapacity(Integer)
System.HandledException: The daily limit for the org would be exceeded by this request

The problem I am having is that I can't for the life of me find where this email limit is being breached. On the systems overview page it only shows general API usage and I can't see anything even close to 100% usage.

4
  • 1
    I believe you're hitting the external address limit as per this developer.salesforce.com/docs/atlas.en-us.apexcode.meta/… which based on your org type is 250, 500 or 1000. This limit is a platform hard limit and it wouldn't be visible in the settings. Commented Jul 13, 2015 at 6:22
  • Ok I guess I'm still a bit confused because I'm running the dev edition which isn't listed. Also, so your saying there isn't a way for me to monitor the usage of the API that is being breached anyway?
    – Shard
    Commented Jul 13, 2015 at 6:37
  • Not all the API limits can be viewed/monitored in the UI, however you can get that information programmatically - see the Limits class developer.salesforce.com/docs/atlas.en-us.apexcode.meta/… Commented Jul 13, 2015 at 6:39
  • Ok I saw that class and when I made a call to the two email functions (getEmailInvocations/getLimitEmailInvocations) i got the result of 0/10. Which tells me I should have 10 emails left but I'm getting an exception when trying to reserve 2 single email slots.
    – Shard
    Commented Jul 13, 2015 at 6:44

1 Answer 1

6

You can check the limit and usage with Salesforce Workbench. Please follow the following steps. You can check the usage at different to see where you hit the limit. Hope this will help.

  1. Ensure you are logged into the organization where you want to verify your limits.
  2. Navigate to https://workbench.developerforce.com/login.php
  3. Accept any oauth prompts to complete authentication
  4. Select "Jump to REST Explorer"
  5. Select execute
  6. From the options presented select: /services/data/v33.0/limits
  7. Select the SingleEmail area to view the daily maximum and remaining calls.
1
  • Yep, this is the way to do it. Even though I just checked it and it said I had 2 emails remaining and I was still getting the error, so it's clearly not a 'live' limit.
    – Matt Lacey
    Commented Jul 13, 2015 at 6:52

You must log in to answer this question.

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