Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:mailconsent

The consent log of the e-mail preferences: list, export as CSV, retention cleanup (dry run unless --apply).

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/mailconsent.md

On this page

exp:mailconsent

The consent log of the e-mail preferences: list, export as CSV, retention cleanup (dry run unless --apply).

Script bin/php/mailconsent.php, code in kernel/private/classes/commands/mailconsent.php. Run it from the installation root, as the user the web server runs as:

./console exp:mailconsent --help
./console exp:mail:consent --help
php bin/php/mailconsent.php --help

Help text

E-mail consent log
  list                      the newest rows (time, person, category, action, old -> new, source)
  export                    the rows as CSV (--output, or the screen); the CSV holds addresses and IPs
  cleanup                   retention: remove the rows of people who are gone after RetentionDays, expired
                            confirmations and old suppression entries; counts only, --apply removes
Filters: --user, --email, --category, --action, --source, --from, --to (YYYY-MM-DD).
cleanup without --apply removes nothing: it counts what it would remove. --dry-run is still
accepted and means the same as no flag; --apply together with --dry-run is a usage error (exit 2).

./console exp:mail:consent list --category=newsletter --limit=20
./console exp:mail:consent export --from=2026-01-01 --output=var/tmp/consent.csv
./console exp:mail:consent cleanup
./console exp:mail:consent cleanup --apply

Options

OptionValueHelp
--userrequireda login or user id
--emailrequiredan address
--categoryrequireda category identifier
--actionrequiredon, off, pending, confirm, ...
--sourcerequiredpage, link, admin, import, signup, bridge, confirm, system
--fromrequiredfrom this day
--torequiredup to this day
--limitrequiredlist: how many (default 50)
--offsetrequiredlist: skip this many
--outputrequiredexport: the file (mode 0600)
--applycleanup: remove the rows (the default counts them and removes nothing)
--dry-runcleanup: the default, kept for scripts that pass it: count only
--addresseslist: show addresses instead of hiding them

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).


Generated by ./console exp:help:examples from bin/php/mailconsent.php, kernel/private/classes/commands/mailconsent.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x