I want to send out emails to the system admin when there is a Fatal exception thrown in our managed package. I'm aware that a managed package has an option of 'send email on apex error' but that sends out an email in case of uncaught exceptions.
My current implementation is to create Messaging.SingleEmailMessage when an exception is hit and send it out. However, it can reach governor limits quickly in case of a lot of Errors.
Is there a way to queue up the emails to a sender address and send it at a scheduled time using apex code?
Is there a best practice in terms of how to handle known exceptions and inform the system admin?