[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 5

send Command

Purpose

Sends a message.

Syntax

sendFile ... | { -draft -nodraftfolder -draftfolder +Folder | -draftmessage Message } ] [ -alias File ] [ -format -noformat ] [ -nomsgid -msgid ] [ -nofilter -filter File ] [ -nopush -push ] [ -forward -noforward ] [ -noverbose -verbose ] [ -nowatch -watch ]

Description

The send command routes messages through the mail delivery system. If the delivery fails, the send command displays an error message. By default, From: and Date: fields are added to each specified message. Unless a $SIGNATURE environment variable or signature: profile entry exists, the send command places the sender's address in the From: field.

The send command puts the current date in the Date: field. If the dist command calls the send command, the send command adds Resent- to the From: , Date: , and Message-ID: fields.

After successful delivery, the send command removes messages from active status by renaming them. The system renames messages by prefacing the current message number with a , (comma). Inactive files are unavailable to the Message Handler (MH) package. However, system commands can still manipulate inactive files. Until you use the send command again, you can retrieve an inactive file.

Flags

-alias File Specifies a mail alias file to be searched. Three MH profile entries are required to use MH aliases:
ali: -alias Aliases
send: -alias Aliases
whom: -alias Aliases

where Aliases is the file to be searched. The default alias file is /etc/mh/MailAliases.

-draft Uses the current draft message if no file is specified. Without this flag and when no file is specified, the send command asks the user if the current draft message is the one to use.
-draftfolder +Folder Specifies the draft folder that contains the draft message to be sent. The -draftfolder +Folder flag followed by a Message parameter is the same as specifying the -draftmessage flag.
-draftmessage Message Specifies the message to be sent. You can use one of the following message references as the value of the Message parameter:
Number Number of the message.
cur or . (period) Current message. This is the default.
first First message in a folder.
last Last message in a folder.
next Message following the current message.
prev Message preceding the current message.
-filter File Uses the format instructions in the specified file to reformat copies of the message sent to the recipients listed in the Bcc: field.
-format Puts all recipient addresses in a standard format for the delivery transport system. This flag is the default.
-forward Adds a failure message to the draft message and returns it to the sender if the send command fails to deliver the draft. This flag is the default.
-help Lists the command syntax, available switches (toggles), and version information.
Note: For MH, the name of this flag must be fully spelled out.
-msgid Adds a message-identification component (such as Message-ID: ) to the message.
-nodraftfolder Undoes the last occurrence of the -draftfolder +Folder flag. This flag is the default.
-nofilter Removes the Bcc: header field from the message for recipients listed in the To: and cc: fields. The flag then sends the message with minimal headers to recipients listed in the Bcc: field. This flag is the default.
-noformat Prevents alteration of the format of the recipient addresses.
-noforward Prevents return of the draft message to the sender if delivery fails.
-nomsgid Prevents addition of a message-identification component. This flag is the default.
-nopush Runs the send command in the foreground. This flag is the default.
-noverbose Prevents display of information during the delivery of the message to the sendmail command. This flag is the default.
-nowatch Prevents display information during delivery by the sendmail command. This flag is the default.
-push Runs the send command in the background. The send command does not display error messages on the terminal if delivery fails. Use the -forward flag to return messages to you that are not delivered.
-verbose Displays information during the delivery of the message to the sendmail command. This information allows you to monitor the steps involved in sending mail.
-watch Displays information during the delivery of the message by the sendmail command. This information allows you to monitor the steps involved in sending mail.

Profile Entries

The following entries are entered in the UserMhDirectory/.mh_profile file:

Draft-Folder: Sets the default folder for drafts.
mailproc: Specifies the program used to post failure notices.
Path: Specifies the user's MH directory.
postproc: Specifies the program used to post messages.
Signature: Sets the mail signature.

Examples

To send a draft message that is in your $HOME/Mail/draft file, enter:

send

The system responds with a message similar to the following:

Use "/home/david/Mail/draft"?

If you enter yes , the draft message is sent, and you are returned to the shell prompt. In this example, the name of the $HOME directory is /home/david.

Files

$HOME/.mh_profile Specifies the MH user profile.
/usr/bin/send Contains the send command.

Related Information

The ali command, comp command, dist command, forw command, post command, sendmail command, spost command.

The mh_alias file format, mh_profile file format.

Mail Overview in AIX Version 4.3 System User's Guide: Communications and Networks.

Peek, Jerry. MH and xmh: E-mail for Users and Programmers. Sebastopol, CA: O'Reilly & Associates, 1992.


[ Previous | Next | Contents | Glossary | Home | Search ]