exp:mailgate
Test the mail gate: who of the given addresses would get a mail of a category, and what the decorated mail looks like.
Script bin/php/mailgate.php, code in kernel/private/classes/commands/mailgate.php. Run it from the installation root, as the user the web server runs as:
./console exp:mailgate --help
./console exp:mail:gate --help
php bin/php/mailgate.php --helpHelp text
Mail gate test
Says for each address what the gate would decide for a mail of --category (allow, off, pending,
master_off, suppressed, unknown_category). With --write the mail goes through the gate with the
transport forced to "file" in this process: it is written to --mail-file-dir (default
var/tmp/mailgate-test), never sent. Addresses are hidden unless --addresses.
./console exp:mail:gate --category=newsletter [email protected],[email protected]
./console exp:mail:gate --category=content [email protected] --write --htmlOptions
| Option | Value | Help |
|---|---|---|
--category | required | the category of the test mail (empty: a mail without category) |
--to | required | addresses, comma separated |
--write | send the test mail through the gate with the file transport | |
--html | an HTML test mail | |
--mail-file-dir | required | where --write puts the mail |
--addresses | show the addresses |
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 ...).
Related
Generated by ./console exp:help:examples from bin/php/mailgate.php, kernel/private/classes/commands/mailgate.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.