Name

MV_EMAIL_INTERCEPT — intercept all outgoing email and redirect it to the specified address

SYNOPSIS

{email_address}

DESCRIPTION

If defined, the variable causes
all outgoing e-mail to be intercepted, and sent to a specified
address or comma-separated addresses.

This feature is intended to allow developers to write and test
functions that send e-mail, without worrying about
accidentally sending mail to end users.

A header in the form of X-Intercepted-To: is inserted
in the message to show the original destination. At the same time,
the interception is also noted in the catalog error log file.

VARIABLE TYPE

Global variable,
Catalog variable

EXAMPLES

Example:
Setting MV_EMAIL_INTERCEPT to "root@mydomain.local"

Set the following in interchange.cfg or catalog.cfg:

Variable MV_EMAIL_INTERCEPT root@mydomain.local

NOTES

Note that this only works for Interchange's built-in e-mail sending
routines. If you use other methods to send e-mail, for example by directly
running sendmail or talking to an SMTP server
you'll have to add implement support yourself.

Be aware that this setting can mask certain programming errors. For
example, trying to send an e-mail without a
To: address would normally result
in an error. With email interception, however, a valid
To: address would be used, and seemingly work as
expected. Before switching off the interception, the only
way to know whether you did everything right is to check the
X-Intercepted-To:
header and verify its correctness. Probably even easier, you should
just monitor error log files as the original e-mail destination is
reported there as well.