0

I am working on a requirement and needs to know how to know if our org. has sent more than a 1000 emails on a specific date.

I have found the following code :

System.debug('limits.getEmailInvocations()                 = ' + limits.getEmailInvocations());
System.debug('limits.getLimitEmailInvocations()            = ' + limits.getLimitEmailInvocations());

found from https://gist.github.com/tyoshikawa1106/e28b602f82582cf119ae

But they can't be used for a specific date. is there any other way using workbench etc.

1 Answer 1

2

There's no way to get that information programmatically. The Limits class only tells you the usage for the current transaction, not for the entire day. You can use the setup menu to request an email log file, but this is run asynchronously.

2
  • So there is no way to get email sent on a specific date using soql/ API. Jun 10, 2016 at 14:25
  • 1
    @cloudlover If you're just concerned about if you're going to hit the limit, you can use reserve*EmailCapacity functions before you try to send the emails.
    – sfdcfox
    Jun 10, 2016 at 16:52

You must log in to answer this question.

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