Archive Mailing
When mailings are archived, compile stats and tidy up the database details. Also provides a Scheduled Job to automatically archive mailings after a certain number of days (disabled by default).
Statistics for mailings are kept on a per-mailing basis, but the per-contact statistics are deleted.
Aims to improve performance by cleaning up database tables that can become very large after a certain amount of time, while still retaining some statistics about mailings sent.
The extension is licensed under AGPL-3.0.
Requirements
- PHP v7.2+
- CiviCRM (FIXME: Version number)
Installation
Install as a regular CiviCRM extension.
Getting Started
(* FIXME: Where would a new user navigate to get started? What changes would they see? *)
Known Issues
(* FIXME *)
TODO
- Hoping this gets merged: https://github.com/civicrm/civicrm-core/pull/22800
- Database tables to gather stats on mailings (mailing_id, recipients, deliveries, opens, clicks, forwards, replies, bounces, unsubscribes, optouts)
- Override
CRM/Mailing/Page/Report::run
via hook, so that we can populate the compiled stats instead. - Api function to archive the mailings. Ex: delete from civicrm_mailing_event_queue where job_id IN (2270,2271,2273,2278,2279,2281); - it will cascade the deletion for clics, opens, bounces, etc.
- When a mailing is archived in the interface, archive the stats.
- Scheduled Job to automatically archive mailings after a certain number of days.