Skip to content

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

Open
@sypets

Description

@sypets

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions