danieleteti / loggerpro

An modern and pluggable logging framework for Delphi
Apache License 2.0
350 stars 90 forks source link

[feature request] EMail Appender: Collective E-Mail #84

Open Basti-Fantasti opened 10 months ago

Basti-Fantasti commented 10 months ago

I have implemented the E-Mail Log Appender in an application which runs unattended to check for errors. On the last weekend a lot of errors came up, due to a server having a planned maintenence.

As a result, the person in charge to check for errors, received over 26000 E-Mails on Monday morning 😨

The idea would be to have an option to configure an interval for sending e-mails (maybe in minutes or hours). So that all messages are collected and then send once per set period instead of instantanously. This would/could have reduced the amount of e-mails in that case to approx. 48 instead of 26000.

danieleteti commented 10 months ago

I understand the problem. In our DMSContainer product we implemented a time-boxed mechanism can't be sent more than 1 email within 10 minutes to the same email address. I would prefer to mimic this approach instead to receive the first email after "potentially" 1 hour. Could be nice to implement a machanism based on the max_frequency of send. e.g. 1/every 10 minutes. However the message not send will be discarded.