- Issue created by @Anybody
- 🇩🇪Germany LRWebks Porta Westfalica
Okay, let's talk about some concrete questions here:
If we view frequency capping as [Limit] per [Timeframe] then:
- What should the user be setting in the Form? Amount, Time, or both? The outgoing mails server limit probably differs a lot depending on what server is employed, correct? So I suppose setting either just the amount or both is feasible.
- How should we keep track of the amount of mails sent in the last [Timeframe]? Do we do it via a database table, like the previous "Max emails per hour" setting handled it? Perhaps there is a different way, like a service that is able to count mails sent during the last [Timeframe]? That would also take into account any mails sent from different modules or core, since e.g. if the server caps at 100 mails/hour, yet a different module has already sent 100 mails, we can't send 100 mails too.
- What should we do after [Timeframe] has expired? For one, we need to reset the counter to 0, but do we send the mails that the admin has missed previously due to the limit or do we start fresh and only mail newly occurring logs?
- 🇩🇪Germany Anybody Porta Westfalica
Re #3:
- We have to put our logic in front of sending these emails, so all the logic is inside our module, before passing them to the mail() method. To be more precise, I see two methods:
- Frequency capping (stop mailing after sending X notifications already)
- Delayed sending (do not send emails for a certain amount of time and then send a digest)
- Yes [Limit] per [Timeframe] is correct. We're only looking at our (not yet sent) log mails.
As log notifications are time-critical, I think we need to use frequency capping, so we should stop sending further notifications if we sent X mails per timeframe already. A bonus would be to not send the same email too frequently, because it might not be as helpful to see the same message a thousand times, but to see different messages instead.
- We have to put our logic in front of sending these emails, so all the logic is inside our module, before passing them to the mail() method. To be more precise, I see two methods:
- Assigned to LRWebks
- Status changed to Needs work
about 2 months ago 12:34pm 18 July 2024 - Issue was unassigned.
- Status changed to Needs review
about 2 months ago 1:02pm 23 July 2024 - Status changed to Needs work
about 2 months ago 1:24pm 23 July 2024 - 🇩🇪Germany Anybody Porta Westfalica
Nice @LRWebks I left some final comments, afterwards this LGTM and we should tag a new release after merge.
- Status changed to Needs review
about 2 months ago 7:48am 24 July 2024 - 🇩🇪Germany LRWebks Porta Westfalica
Alright, all remaining issues resolved now. @Anybody are you taking a final look?
- Status changed to Fixed
about 2 months ago 11:37am 24 July 2024 Automatically closed - issue fixed for 2 weeks with no activity.