7 sendmail: Sending E-Mail
provides tools for sending electronic mail messages using a
program on the local system. See also the
package, which sends mail via SMTP.
All strings used in mail messages are assumed to conform to their
corresponding SMTP specifications, except as noted otherwise.
7.1 Sendmail Functions
The first argument is the header for the sender, the second is the
subject line, the third a list of “To:” recipients, the fourth a
list of “CC:” recipients, and the fifth a list of “BCC:”
recipients. Additional arguments argument supply other mail headers,
which must be provided as lines (not terminated by a linefeed or
carriage return) to include verbatim in the header.
The return value is an output port into which the client must write
the message. Clients are urged to use close-output-port on
the return value as soon as the necessary text has been written, so
that the sendmail process can complete.
The from argument can be any value; of course, spoofing
should be used with care.
Lines that contain a single period do not need to be quoted.
7.2 Sendmail Unit
7.3 Sendmail Signature
Includes everything exported by the net/sendmail module.