Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications for powermail answers are not sent if powermail plugin is deactivated (or missing) #9

Open
sypets opened this issue Dec 27, 2024 · 0 comments

Comments

@sypets
Copy link
Contributor

sypets commented Dec 27, 2024

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

  1. Create working powermail plugin with form

  2. In plugin, set "Data protection / Clean-up" to:

    • data will be cleaned after the specified deletion period
    • deletionPeriod=2
    • informReceiversBeforeDeletion=1
    • informReceiversBeforeDeletionPeriod=1
  3. Now fill out form and create an answer

  4. 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;

  5. Now deactivate the plugin

  6. Call the notification command: php vendor/bin/typo3 powermail_cleaner:informReceivers

    • Expected result: Mail sent
    • Actual result: no mail sent
  7. Now activate the plugin

  8. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant