SND(1)

NAME
snd - send mail (using a visual editor)

SYNOPSIS
snd [address...] [-b address...] [-c address...] [-h host] [-s subject] [-t address...] [-f file] [-n]

DESCRIPTION

Snd sends messages to a user-specified list of recipients. When invoked without arguments, snd places the user in $EDITOR with the "from" line already filled in, and the following fields blank:

    To:
    cc:
    Subject:

Snd will select the editor by first looking in the .sendrc for "veditor", then for "editor", then $VISUAL, then $EDITOR, and then the default (as compiled-in by your system manager). The expected user responses are:

    1)  To the "To:" and "cc:" prompts, a list of valid user names (see below).

    2)  To the "Subject:" prompt, a brief description of the subject of the message.

Copies of the message are delivered to recipients on the "To:" and "cc:" lists. A response to the "To:" prompt is required, unless blind carbon copies (bcc) are specified.

The user should fill-in the header fields to the right of the colon.

The user must leave a blank line between the header field and the body of the message. Without the blank line after the headers, the message text up to the first blank line will be construed as just a continuation of the last header line.

  Arguments

Snd may be invoked with arguments. If they are specified, then the contents of any resulting fields will be filled in when the user enters the editor. Unless switches (a character preceded by a dash) are used, the arguments are taken to be addresses for the "To:" field.

    -b  causes following arguments to be added to the "BCC:" field.

    -h  causes the next argument to be used as the default host reference, for addresses not explicitly containing a hostname. When not specified, the default is the local host.

    -c  causes following arguments to be added to the "cc:" field.

    -s  causes the next argument to be used as the "Subject:" field's contents.

    -t  causes following arguments to be added to the "To:" field.

    -f  causes following file to be included in the message.

    -n  causes the text input stage to be skipped. The user is given the "command or ?:" prompt immediately after the header information is given.

  Valid User Addresses

A valid address name takes one of the following forms:

    1)  A local Unix user's login name, such as "crocker."

    2)  A name which has been designated as a local alias, such as "support." This usually will not look any different from login names, except that it may be longer than their 8-character limit.

    3)  The two-part "mailbox@host" address for a user on another machine.

Validation of names is done at posting time, and is performed by the message delivery system, rather than by snd. All addresses are made to have a host reference. If the user does not specify a host for an address, then the default host is assumed.

The user enters the text of the message below the address and subject fields. When the message is completed, or when the user wishes to insert a file, s/he merely exits the editor normally. Snd then prompts the user for its next action.

  User Options and Environmental Tailoring

The user may define a file in his home directory called ".sendrc". If such a file exists, snd will open the file and set options as specified, otherwise the defaults will be used. Below are listed the options available for user modification along with their default values.

aliases
    Allows the user to declare his own set of aliases for use with snd. Unless this file name begins with a '/', snd will look for this file in the user's home directory. The format for this file is:
        aliasname user1@host,user2@host,user3@host...
    Note that each entry must be on a single line but each line may be up to 511 characters long. The host may be eliminated if the default host is correct.

checker
    This will be the user's spelling checker while using snd. The default for this option is spell.

copyfile
    This is the file in which copies of messages will be stored if requested by the user. Unless the first character of the supplied filename is '/', the file will be created in the user's home directory. The default for the copyfile is a file called ".sent" in the users home directory. See also "file, nofile, fileonquery" below.

draftdir
    If supplied, draft files will be created in this directory. Otherwise, they will be created in the user's home directory. Drafts are used for intermediate storage of the message body, and are deleted after a normal exit. Should snd exit abnormally, your message will be saved as a draft file. Draftdir should be a complete path name.

editor, veditor
    This will be the user's editor while using snd. The default for this option is described above. If both "editor" and "veditor" are specified, the latter definition will apply.

file, nofile, fileonquery
    The presence of one of these options allows the users to control the keeping of file copies. "File" will result in a copy being kept of every message sent by the user. "Nofile" will turn off the file copy option and no copies will ever be kept. "Fileonquery" will cause snd to query the user as to whether a copy should be kept or not.

header
    This option allows user-defined header lines to be added to the message being sent. The first argument is the field name (e.g. Organization). The second argument is the contents of the field (e.g. West Podunk College). A separate header line will be added for each "header" command in the .sendrc file.

paging
    Having this in your .sendrc will cause your message to be displayed through the "more" program when using the "review message" command.

signature, nosignature
    Snd will automatically fill in the "From:" field with your address. The form of the contents is either:
        login@host or Full Name <login@host>
where "login" is your Unix login name, and "host" is the name of the Unix you are using. The second form is the default on some systems. On these systems, "Full Name" is derived from the system password file. The "nosignature" command forces snd to use the form:
    login@host

You may personalize your messages by including a signature. If your .sendrc file contains a signature line, its contents will be used in the "From:" field, ahead of the address information. The signature cannot contain any of the following characters unless quoted with double quotes: '( ) < > @ , ; : " . [ ]' and it cannot be blank. The program will verify the signature line for correctness at startup and will complain if your signature is illegal. The "From:" field then will appear as follows:

    signature <login@host>

subargs
    Allows the user to specify additional flags for the submit program ('v' and 'm' are always passed). Probably not for general use.

The format for a typical .sendrc profile is shown below:
    copyfile sent_mail
    draftdir /usr/joe/.drafts
    signature Joe Foobar
    subargs w
    editor gemacs
    fileonquery
    aliases joes_aliases
    header Organization "West Podunk College"

  Commands

snd commands must be followed by a carriage return. Only enough of a command to make it unique need be typed. The following are valid commands:

?
    displays a list of snd's commands.

bcc
    prompts for addresses for the "BCC:" Blind carbon copies field. If any addresses are specified for Blind carbon copies, they receive a slightly different message than those listed in "To:" or "cc:". Their copy has a header component named "BCC:"; its contents are the string "(Private)". If the message had no "To:" addresses, then the "To:" field will contain the string "list:" and there will be no BCC field. In addition, the "To:" and "cc:" fieldnames are modified to prevent recipients from automatically replying to anyone in the "To:" or "cc:" fields.

        NOTE: If a message has normal and BCC recipients and there is an error with a BCC address, the normal addresses will have been processed, and the copy of their message sent, before the BCC address error is detected.

quit
    exits the snd program. If the user has not yet sent the message, the user is asked to confirm the action. A "yes" (or 'y') is required, followed by a <CR>, or the command will be aborted and the user returned to the "Command or ?:" prompt.

bye
    same as "quit".

check spelling
    will invoke the spelling checker with the draft filename as the argument to the checker program. (See "checker" user option above.)

ed
    will invoke the user's editor and read in the user's headers, and message body for editing. (See "editor" user option above.)

file
    indicates the user wishes to append a file to the end of the message body. Snd will prompt for file name.

post
    same as "send".

review message
    retypes message in its current form. If "paging" is specified in the .sendrc, then the draft will be displayed via the "more" program.

send
    posts the message to the message delivery system. The message is delivered immediately to local users and queued for later delivery to non-local users. The sender is informed of the posting disposition of the message. Each address is listed and followed by its status, indicating that the address is ok, or that there was a problem.

    If all addresses are valid, the sender is then informed that the message has successfully been posted for delivery. If any addresses are found to be invalid, the remaining addresses are still checked, but submission is aborted. The user is returned to command input, so that he may change the addresses and make them legal.

set
    allows the user to check the current values of option variables. If followed by arguments, allows the user to change the current setting of variables. The changed value lasts only for the current invocation of snd.

program run
    allows the user to give a shell command. Snd prompts for program. The user's response is passed to the shell. Control is returned to snd when the command has been executed.

CTRL-D
    same as "quit"

FILES

<login directory>/.sendrc
    user options

<login directory>/aliases
    user supplied alias file

<login directory>/.sent
    sent messages

<login directory>/drft.XXXXXX
    body of current message

SEE ALSO
v6mail(1), msg(1), resend(1), send(1)

DIAGNOSTICS
All diagnostic messages are intended to be self explanatory.