Skip to the content
Documentation

exp:mailconsent

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

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

Usage

./console exp:mailconsent [options]
php bin/php/mailconsent.php [options]
./console exp:mail:consent [options]

Aliases

exp:mail:consent

Help

The output of ./console help exp:mailconsent (the script run with --help), without the standard options:

Usage: bin/php/mailconsent.php [OPTION]...
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:
  --user=VALUE      a login or user id
  --email=VALUE     an address
  --category=VALUE  a category identifier
  --action=VALUE    on, off, pending, confirm, ...
  --source=VALUE    page, link, admin, import, signup, bridge, confirm, system
  --from=VALUE      from this day
  --to=VALUE        up to this day
  --limit=VALUE     list: how many (default 50)
  --offset=VALUE    list: skip this many
  --output=VALUE    export: the file (mode 0600)
  --apply           cleanup: remove the rows (the default counts them and removes nothing)
  --dry-run         cleanup: the default, kept for scripts that pass it: count only
  --addresses       list: show addresses instead of hiding them

Options

Option Value Description
--user required a login or user id
--email required an address
--category required a category identifier
--action required on, off, pending, confirm, ...
--source required page, link, admin, import, signup, bridge, confirm, system
--from required from this day
--to required up to this day
--limit required list: how many (default 50)
--offset required list: skip this many
--output required export: the file (mode 0600)
--apply - cleanup: remove the rows (the default counts them and removes nothing)
--dry-run - cleanup: the default, kept for scripts that pass it: count only
--addresses - list: show addresses instead of hiding them

Standard options

Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.

Source

bin/php/mailconsent.php, kernel/private/classes/commands/mailconsent.php

See also

Generated example: exp:mailconsent

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.