With MAILTOOL v13.00 and up the ability to redirect emails system wide, or at the command level, is now possible.
This may be useful on a development or testing system where you don't want emails to be delivered directly to the intended recipients and instead redirected to an account local to your system for testing.
This option also adds the option to change the sender, mail router, and a host of other settings by allowing you to specify a configuration file to override any of the possible options included in configuration files.
System Wide Redirection
Use the MLTREDIR command to enter the MAILTOOL Redirection Settings.
MAILTOOL Redirect Settings
Redirect Setting: *NO (*NO/*YES)
Config File: *DFT
Press F6 to save your settings.
F3=Exit F5=Refresh F6=Save Settings
Redirect Setting - Specify *YES to redirect emails system wide.
Config File - Specify the fully qualified path to a configuration file that can be used to override items such as From Address, Mail Router, Authentication Parameters, etc. Pretty much anything that can be specified in a configuration file may be used in this file. You can also leave this as *DFT and the default values from the operation will be used.
Recipient - Specify the recipient for the emails. You can alternatively specify a MAILTOOL Distribution List (example *TESTING) to be able to configure multiple recipients and recipient types (ie, TO, CC, BCC). Leave this value as *DFT to use the recipients specified on the original operation.
NOTE: Be sure to press the F6 command key to make sure that any changed you made are saved.
If you want to reload the current values before saving any changes, use the F5 function key.
Command Level Redirection
With the MAILTOOL command and/or ILE functions you can also override the settings in the MLTREDIR command for each specific email. See the MAILTOOL Command Documentation or the MAILTOOL ILE Function Documentation for specifics.