The MAILTO command is a submission agent that submits messages directly to the maildrop. Unlike the SENDMAIL compatibility utility it does not require that any servers be running. It writes files directly to the maildrop itself.
MAILTO reads a message body, sans headers, from its standard
input and the envelope from its command line. It
canonicalises the envelope,
headers from the command-line information, canonicalizes the resulting
message (which adds
headers), and submits the message to the MTS.
In addition to canonicalizing the message, MAILTO prepends a
Received: line to the message describing its passage through
Because it can be onerous to remember to add the
/TRIGGER options every time, these can be specified in the
value of the
IU_MAILTO_INIT environment variable, which is
parsed by MAILTO as if it is a part of the command line, before the
command line proper is parsed.
MAILTO always writes any progress log information to its standard error stream. To save the log in a file, simply redirect the standard error stream to the file.
To send the contents of config.sys to user "JdeBP", marking it as coming from user "sysop":
[c:\]mailto -f sysop JdeBP < config.sys