MAILTO /? [/F string] [/S string] [/TRIGGER string] [/QUEUE string] mailboxes …


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, creates From:, To:, and Subject: headers from the command-line information, canonicalizes the resulting message (which adds Date: and Message-ID: 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 MAILTO.

Because it can be onerous to remember to add the /QUEUE and /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

Command-specific options

Specify the envelope sender and default sender.
Specify the Subject: header's contents.
Specify the semaphore to signal whenever a message has been submitted.
Specify the maildrop directory name.

The Internet Utilities are © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.