Purpose/Overview: If an email isn't sent when processing patron notices due to a FOLIO system error, such as a missing object reference (see
CIRC-926, CIRC-925, CIRC-1145) or no email address on the user record (see CIRC-1131) or the template and policy settings are mismatched (several earlier issues filed), there is no visibility to FOLIO users that these errors happened. Also, in some cases (maybe all), the circulation log is misleading because it displays that an email was sent even if there was an error and the mod_email.email_statistics just shows emails that were sent. The inconsistency between these two "audits" or sources of information is what helped TAMU uncover the issue seen in CIRC-1131, which was because 14K users in their test system didn't have email addresses. It would help users more easily identify issues if both or one of these sources of information showed errors when errors were encountered during the processing of emailed patron notices.
- Capture and log FOLIO system errors, such as those listed above
- NOT IN SCOPE - any errors once the notice leaves the FOLIO system and is sent to the email (SMTP) server (these are captured by the service used)
- Adjust the circulation log processing so that the entry made to the circulation log is made after the attempt to create and send the email. If it fails, then the entry made says "Error processing notice" with details of the error if it's that's possible.
Add an entry to the mod_email.email_statistics table when an error is encountered OR add a new table to capture only errors.