Skip to the content
Documentation

exp:mailgate

No ratings yet

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

Summary

Test the mail gate: who of the given addresses would get a mail of a category, and what the decorated mail looks like

Usage

./console exp:mailgate [options]
php bin/php/mailgate.php [options]
./console exp:mail:gate [options]

Aliases

exp:mail:gate

Help

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

Usage: bin/php/mailgate.php [OPTION]...
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 --html


Options:
  --category=VALUE       the category of the test mail (empty: a mail without category)
  --to=VALUE             addresses, comma separated
  --write                send the test mail through the gate with the file transport
  --html                 an HTML test mail
  --mail-file-dir=VALUE  where --write puts the mail
  --addresses            show the addresses

Options

Option Value Description
--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

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/mailgate.php, kernel/private/classes/commands/mailgate.php

See also

Generated example: exp:mailgate

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.