Document revision date: 15 July 2002
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS User's Manual


Previous Contents Index

7.12.3 Selecting an Editor

By default, Mail invokes the DECTPU-based EVE editor when you specify the Mail command SEND/EDIT. By entering the Mail command SET EDITOR, you can specify that a different editor be invoked instead of EVE. For example, to select the EDT editor, issue the Mail command SET EDITOR EDT. The EDT editor remains your default Mail editor (even if you log out of the system and log back in) until you enter another SET EDITOR command.

To display the name of the selected Mail editor, enter the Mail command SHOW EDITOR.

7.12.4 Using a Command File to Edit Mail

You can define the logical name MAIL$EDIT to be a command file before entering Mail. Then, when you issue any Mail command that invokes an editor, the command file will be called to perform the edit. In the command file, you can also invoke other utilities such as the spell-checker and you can specify any function that can be done in a command file. Refer to Appendix B for an annotated example of a MAILEDIT.COM command procedure and refer to Chapter 13 and Chapter 14 for more information on command files.

7.12.5 Overriding Your Selected Editor

If you wish to temporarily override your selected editor, you can define MAIL$EDIT to be the string "CALLABLE_" with the desired editor name appended. For example, to use callable EDT rather than callable EVE, you can type the following command:


$ DEFINE MAIL$EDIT CALLABLE_EDT 

If you issue the SET EDITOR command during a session that was invoked with MAIL$EDIT defined, you override both your permanent selected editor and the current editor setting. To use the command file defined by MAIL$EDIT again, you must exit from Mail and restart it.

7.13 Using the Mail Keypad

You can use the numeric keypad on your keyboard to execute commands in Mail. Most keypad keys can execute two commands.

Figure 7-2 shows the Mail keypad. To enter the top command for each key shown, press the appropriate key. To enter the bottom command shown, press the PF1 key first, and then the desired function key.

Figure 7-2 Mail Utility Keypad


To execute the Mail command SEND, press KP7. To execute the Mail command SEND/EDIT, press the PF1 key first and then press KP7.

7.13.1 Redefining Keypad Keys

You can redefine the keypad keys to execute Mail commands when you are in Mail. Note that the previous definition of the key is superseded when you redefine a key.

Defining keypad keys in Mail is similar to defining keypad keys to execute DCL commands.

In the following example, the key KP2 is defined as the Mail command PRINT/PARAM=PAGE_ORIENT=LANDSCAPE. After KP2 is defined, you can press it to display the PRINT/PARAM=PAGE_ORIENT=LANDSCAPE command:


MAIL> DEFINE/KEY KP2 "PRINT/PARAM=PAGE_ORIENT=LANDSCAPE"  

7.13.2 Assigning Additional Key Definitions

To increase the number of key definitions available on your terminal, use the /STATE qualifier. You can assign many definitions to the same key as long as each definition is associated with a different state. State names can be any alphanumeric string. By specifying states, you can press a key once to enter a command and a second time to enter a qualifier.

In the following example, PF1 (pressed twice) is defined as DIRECTORY/FOLDER:


MAIL> DEFINE/KEY PF1 "DIRECTORY"/SET_STATE=FOLDER /NOTERMINATE  
MAIL> DEFINE/KEY PF1 "/FOLDER" /IF_STATE=FOLDER /TERMINATE  

Press PF1 twice to enter the command DIRECTORY/FOLDER. The /TERMINATE qualifier ends the command line so you do not need to press the Enter key.

7.13.3 Creating Permanent Key Definitions

Any keypad keys that you define during a Mail session are lost when you exit from Mail. To retain keypad key definitions from one Mail session to another, create a file containing key definitions (for example, MAIL$KEYDEF.INI) in your top-level directory. For example, the following MAIL$KEYDEF.INI file contains six key definitions:


DEFINE/KEY PF1 "DIRECTORY "     /NOTERMINATE    /SET_STATE=folder 
DEFINE/KEY PF1 "/FOLDER"        /TERMINATE      /IF_STATE=folder 
DEFINE/KEY PF2 "SELECT "        /NOTERMINATE    /SET_STATE=mail 
DEFINE/KEY PF2 "MAIL"           /TERMINATE      /IF_STATE=mail 
DEFINE/KEY PERIOD "READ "       /NOTERMINATE    /SET_STATE=new 
DEFINE/KEY PERIOD "/NEW"        /TERMINATE      /IF_STATE=new 

To execute these commands each time you invoke Mail, enter the following command line in your login command file (LOGIN.COM):


$ DEFINE MAIL$INIT SYS$LOGIN:MAIL$KEYDEF.INI 

7.14 Summary of Mail Commands

This section contains a summary of all Mail utility commands. For complete information on qualifiers used with these commands, refer to online help.

See also Section 7.15 for information about using the MIME utility to read and compose MIME-encoded messages.

7.14.1 Reading Messages

Use the following commands to read messages:

7.14.2 Exchanging Messages

Use the following commands to exchange messages:

7.14.3 Removing Messages

Use the following commands to remove messages:

7.14.4 Printing Messages

Use the following commands to print messages:

7.14.5 Organizing Messages

Use the following commands to organize messages:

7.14.6 Marking Messages

The following commands are used for marking messages:

7.14.7 Customizing the Mail Environment

The following commands are used for customizing the mail environment:

7.14.8 Exiting or Transferring Control

The following commands are used for exiting Mail or transferring control:

7.14.9 Mail File Compression

The following command is used for compressing mail files:

7.14.10 System Management Commands

The following commands are used for system management:

7.15 MIME Utility

The Multipurpose Internet Mail Extension (MIME) is the standard used to attach nontext files to mail messages. The MIME utility allows you to compose and read MIME-encoded mail messages. With MIME, nontext files, such as graphics or sound files, are encoded and sent as plain text, although that text may not be readable. The MIME utility decodes MIME files to their original form and allows you to create MIME-encoded files, which can be sent as mail messages using the OpenVMS Mail utility.

7.15.1 Invoking the MIME Utility

The system manager may have already set up the foreign command for MIME, but if not, you can do so by adding the following line to your LOGIN.COM:


$ MIME :== $SYS$SYSTEM:MIME.EXE 

MIME will only open MIME encoded text files. You need to extract the MIME-encoded message into a text file using Mail first. (See Section 7.6.3 for instructions.)

To invoke the MIME utility from the DCL prompt, enter the following:


$ MIME file-name.TXT 

The file name qualifier is optional. If the file specified exists, it is opened READ_ONLY.

The MIME utility does not construct any header information such as the To: or From: fields. It creates only MIME headers and the body text of the message, saving the text in a file to be sent by Mail later. If the file specified to be opened contains such recognizable headers or any RFC822 headers, the file is opened and the default is /READ_ONLY.

If the file specified does not contain any recognizable headers or does not exist, an OPEN FILE ERROR message occurs.

You can establish system-wide defaults for displaying MIME-encoded messages by creating two files: MIME$MAILCAP.DAT and MIME$FILETYPES.DAT.

MIME$MAILCAP.DAT contains an application that defines each locally-recognized content type of MIME-encoded files. MIME$FILETYPES.DAT associates each content type with a file extension. A user can override the defaults by creating these files in SYS$LOGIN.

7.15.2 Initializing the MIME Utility

When a user starts the MIME utility, the initialization process performs the following steps:

  1. In the user's VMSmail profile, the MIME utility looks up the user's mail directory and default editor for use with the MIME utility.
  2. The MIME utility reads files MIME$MAILCAP.DAT and MIME$FILETYPES.DAT.
  3. The MIME utility refers to the following list of internal defaults:

7.15.3 Creating Optional MIME Utility Files

Table 7-1 lists and describes files you might want to create to customize the MIME utility on your system.

Table 7-1 MIME Utility Optional Files
File Purpose
MIME$MAILCAP.DAT For the display and parsing of incoming messages.
MIME$FILETYPES.DAT For the assignment of content types to outgoing attached files.

Place these files in the SYS$LOGIN directory.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6489PRO_014.HTML