Configuring and Managing MPE/iX Internet Services (August 2002)
Chapter 10
Sendmail for MPE/iX
Sending E-mail
196
Sending E-mail
The POSIX mailx command can be used to send simple e-mail messages via Sendmail. Mailx reads the file
/etc/mailx.rc to determine which mail delivery program to use, and the Sendmail installation script
modifies this file to specify that Sendmail shall be used. For more information about mailx, please see “man
mailx” or the MPE/iX Shell & Utilities Reference Manual Vol. 1.
To send a message interactively:
1. :XEQ SH.HPBIN.SYS -L
2. shell/iX> mailx someuser@some.host
Subject: hello world
Hi,
How are you doing?
:EOD
EOT
To send a message from a pipe:
1. :XEQ SH.HPBIN.SYS -L
2. shell/iX> echo "Hi,\n\nHow are you doing?" |\
mailx -s "hello world" someuser@some.host
To send a message from a disk file:
1. :XEQ SH.HPBIN.SYS -L
2. shell/iX> /bin/cat - >/diskfile/containing/message/body
Hi,
How are you doing?
:EOD
3. shell/iX> mailx -s "hello world" someuser@some.host \
</diskfile/containing/message/body
Mailx only gives you limited control over message headers and does not allow you to send attachments. For
total control over message formatting and content, you will need to invoke Sendmail directly.
Sendmail expects you to pass it a fully formatted message via stdin that consists of both header data and body
text. Note that an empty line is used to delimit where the headers end and the body text begins.
To send a message interactively:
1. :XEQ SH.HPBIN.SYS -L
2. shell/iX> /bin/cat - | /SENDMAIL/CURRENT/SENDMAIL someuser@some.host
Subject: hello world
Hi,
How are you doing?
:EOD
To send a message with Sendmail reading the headers to determine the recipient addresses:
1. :XEQ SH.HPBIN.SYS -L