You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the powermail mails are "orphaned", e.g. because the plugin is deactivated or deleted, the mails will get deleted, but no notification is sent.
Reproduce
Create working powermail plugin with form
In plugin, set "Data protection / Clean-up" to:
data will be cleaned after the specified deletion period
deletionPeriod=2
informReceiversBeforeDeletion=1
informReceiversBeforeDeletionPeriod=1
Now fill out form and create an answer
Manually change the deletion time, e.g. (so it will be deleted in 1 day from now): mysql> update tx_powermail_domain_model_mail set deletion_timestamp=UNIX_TIMESTAMP(NOW())+86400 where uid=55;
Now deactivate the plugin
Call the notification command: php vendor/bin/typo3 powermail_cleaner:informReceivers
Expected result: Mail sent
Actual result: no mail sent
Now activate the plugin
Call the notification command again: php vendor/bin/typo3 powermail_cleaner:informReceivers
Expected result: Mail sent
Actual result: Mail sent
Possible solution
Do not just write the deletion_timestamp but also the time for notification email to the database table tx_powermail_domain_model_mail. This way it might not even be necessary to iterate through the plugins.
Also, it might be nice, if it was marked in the DB table tx_powermail_domain_model_mail that the notification mail was already sent. This way the mail will not be sent multiple times (if for example the notification command was set up to be called more than once a day). Also, you could perform checks before deletion to make sure the mail was sent.
On the other hand: if the notification setup is written to the mail it cannot be changed later. By default, the user will get notified for each mail (if notification is activated).
Usecase / scenarios
Especially if there is an event, the powermail plugin might get deactivated but the answers have not yet been processed.
Versions
TYPO3 12.4.24
powermail_cleaner dev-main
The text was updated successfully, but these errors were encountered:
If the powermail mails are "orphaned", e.g. because the plugin is deactivated or deleted, the mails will get deleted, but no notification is sent.
Reproduce
Create working powermail plugin with form
In plugin, set "Data protection / Clean-up" to:
Now fill out form and create an answer
Manually change the deletion time, e.g. (so it will be deleted in 1 day from now):
mysql> update tx_powermail_domain_model_mail set deletion_timestamp=UNIX_TIMESTAMP(NOW())+86400 where uid=55;
Now deactivate the plugin
Call the notification command:
php vendor/bin/typo3 powermail_cleaner:informReceivers
Now activate the plugin
Call the notification command again:
php vendor/bin/typo3 powermail_cleaner:informReceivers
Possible solution
Do not just write the deletion_timestamp but also the time for notification email to the database table
tx_powermail_domain_model_mail
. This way it might not even be necessary to iterate through the plugins.Also, it might be nice, if it was marked in the DB table
tx_powermail_domain_model_mail
that the notification mail was already sent. This way the mail will not be sent multiple times (if for example the notification command was set up to be called more than once a day). Also, you could perform checks before deletion to make sure the mail was sent.On the other hand: if the notification setup is written to the mail it cannot be changed later. By default, the user will get notified for each mail (if notification is activated).
Usecase / scenarios
Especially if there is an event, the powermail plugin might get deactivated but the answers have not yet been processed.
Versions
The text was updated successfully, but these errors were encountered: