Commit Graph

11 Commits

Author SHA1 Message Date
John Oleksowicz
c75bc388c9 Remove unnecessary cleanup code
MAILPOET-5145
2023-04-07 12:11:12 -05:00
Rostislav Wolny
522b8a87db Fix flaky MailerLog testItTruncatesOutdatedEntriesWhenIncrementingSentCount
The test was setting the value that was later checked to the very edge of the allowed interval.
So if the tested method was executed a second later test failed.
This commit sets the tested value a second before the end or the interval so
there should be enough time for the method to run with the expected outcome.
[MAILPOET-4866]
2023-01-30 09:32:31 +02:00
Rostislav Wolny
0bbdf4b47f Add error log when pausing sending due an error
[MAILPOET-4940]
2023-01-09 20:01:47 +01:00
Rostislav Wolny
e13113e38b Fix condition for pausing sending when confirmation emails fail
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
Rostislav Wolny
11beebf74d Add MailerLog method for handling transactional emails errors
The new method allows processing sending errors that happen when sending from other places of plugin
then from the Sending Queue worker.
After three failed attempts it pauses the sending and admin user will see an notice.
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
Jan Jakes
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Rostislav Wolny
2d21489c44 Always reset MailerLog error on increment send count
Recently we've stopped incrementing sending counter when site configured to use MSS.
This caused that also code reseting the sending error was skipped.
This commit changes incrementSentCount method so that it always clears error log.
[MAILPOET-4448]
2022-06-20 14:17:54 +02:00
David Remer
ec7fe4161f Do not increment counter when sending method is MSS
[MAILPOET-4122]
2022-03-21 10:17:37 +01:00
David Remer
ac52f2af99 Introduce phpstan-type for MailerLog data
[MAILPOET-4122]
2022-03-21 10:17:37 +01:00
David Remer
53da8bf999 Change data model to calculate sending limit reached
Before this commit, we used to calculate whether the sending limit was reached
by simply counting, how many emails where sent and when we did send them the
last time. In case the last time we did send was before the sending frequency,
and we reached the limit we would reset the calculation.

This led to the following problem:

In case we had e.g. one email send at an outdated timestamp, we would first fill
the outdated timestamp and once we reached the limit, we would reset the counter
and start with the current timestamp. So it followed, we would send more emails
than the limit would allow for.

[MAILPOET-4122]
2022-03-21 10:17:37 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00