1 Overview Multipurpose Internet Mail Extensions (MIME) The MIME utility is a standalone, user-mode, nonprivileged utility that provides MIME interpretation and composition editing. Messages in the VMSMAIL MAIL files can be extracted into text files and then be read and interpreted using MIME. MIME formatted text files can be composed using MIME, and then sent using VMSMAIL to OpenVMS and other systems that have a MIME utility or MIME capable MAIL application. 2 Composing_Messages MIME provides basic composition commands that allow you to create a text file in MIME compliant format: NEW, OPEN/DRAFT, ADD, EDIT. Use the NEW command, which runs the editor specified in the VMSMAIL user profile, to create a text message. You are prompted for a filename if one is not specified. MIME> NEW [filename] Or you can use the OPEN/DRAFT command to continue editing a previous MIME message that was composed and saved. MIME> OPEN/DRAFT [filename] Then use the ADD and REMOVE commands to add attachments (or parts) to the message or to remove them. Attachments are such as binary image files, sound files, and compound documents, and also text. MIME> ADD filename /CONTENT_TYPE="image/gif" /ENCODING=base64 MIME> REMOVE n Where "n" is the attachment number. Use the LIST command to list attachments and their characteristics. Lastly, execute the SAVE command to write the composed outgoing MIME text file. MIME> SAVE Note that the MIME command SHOW FILE_TYPES lists the file types and their default settings for the ADD command. Other optional file types: the file extension, its Content-Type/subtype, and the encoding to use, are defined in MIME$FILETYPES.DAT file. For more help, see the ADD command and SHOW FILE_TYPES MIME$FILETYPES.DAT command. 2 Extracting Attachments A message is opened for read access in one of the following ways: $ MIME filename.xxx MIME> OPEN filename.xxx MIME decodes the attachments (or parts) of the MIME encoded mail message when opened, storing them as temporary files in your defined MAIL directory. If the file is opened with the OPEN command, MIME automatically lists the attachments of the MIME encoded mail message. You can also list the attachments and their characteristics (content-type/subtype, encoding scheme, file name ...) with the following command: MIME> LIST Attachments, such as binary .JPG images, documents, spreadsheet files, audio, DECsound, and text attachments, can be extracted into their native file format using the following MIME command: MIME> EXTRACT /ATTACHMENT=n [filename] Where "n" is the attachment number listed with the MIME LIST command. The filename is optional, unless MIME cannot determine the file name from the attachment information. In that case, MIME will prompt you for a file name. The attachment is stored as a file in the default directory. See HELP EXTRACT for more information. 2 Getting_Started The MIME utility is a tool for reading MIME-formatted messages that are delivered in VMSMAIL messages. SMTP/MIME based mail systems, such as the Compaq TCP/IP Services for OpenVMS mail system, deposit incoming MIME-formatted messages into the VMSMAIL message store. To read and extract binary attachments in such messages, use VMSMAIL to extract the message into a text file; then run the MIME utility to interpret its contents. This approach would allow MIME to be easily backported and used on previous versions of OpenVMS, without changing the existing VMSMAIL environment. On some SMTP/MIME mail systems, the message headers can be moved from the beginning of the message, where they would normally appear, to the end of the message, as a convenience to the reader. Unfortunately, this makes it impossible for MIME interpreters such as the MIME utility to interpret the contents of the message. If SMTP messages are reformatted in this manner, see the system administrator about disabling this feature so that SMTP headers appear in their original position at the beginning of the message. For Compaq TCP/IP Services for OpenVMS, you can disable this feature using the SET CONFIGURATION SMTP/OPTIONS=TOP command. 2 Restrictions The MIME utility does not fully integrate with the VMSMAIL user interface to send MIME messages over the internet. You can use VMSMAIL to send MIME messages created and saved with the MIME utility. Those messages can then be interpreted using MIME at the destination OpenVMS host or with a MIME capable reader on another system platform. However, MIME messages sent with Compaq TCP/IP Services for OpenVMS may not be interpreted by MIME programs other than the OpenVMS MIME Utility. That is unless the version of TCP/IP Services for OpenVMS is later than V5.0A, or the latest TCP/IP updates have been applied. As of TCP/IP Services for OpenVMS version V5.0A, a known problem exists where an extra NEWLINE character corrupts the MIME message sent with SMTP. This will be corrected in the next release of TCP/IP Services for OpenVMS. 2 Viewing_Messages MIME operates as a standalone utility to interpret MIME-formatted messages received by VMSMAIL. Use the VMSMAIL command EXTRACT/NOHEADER to extract a MIME-formatted message received by VMSMAIL into a text file. MAIL> EXTRACT/NOHEADER filename A message is opened for read access in one of the following ways: $ MIME filename.xxx MIME> OPEN filename.xxx The OPEN command opens and decodes the message file, in preparation for file viewing. Use the MIME READ command to display the file. MIME> READ 3 Notes_on_Content-types Not all attachments (content-type/subtypes, such as .DOC and .XLS), can be displayed with the OpenVMS MIME utility. OpenVMS MIME displays only the attachments that have been defined and have a native OpenVMS viewer application installed and associated with that defined content-type/subtype. Example OpenVMS native viewer applications include NETSCAPE to display .HTML and .HTM attachments, and Freeware X-VIEW application to display image types .JPG, .GIF, and .JPEG subtypes. Also note that foreign commands must be defined for invoking these native viewer application images. This is so OpenVMS MIME can pass a filename (string) representing the attachment to the viewer application, for example: NETSCAPE :== $ SYS$MANAGER:NETSCAPE-EXPORT-ALPHA-V303C4R-JAVA-GOLD.EXE XV == "$ SYS$LIBRARY:XV.EXE" Content-types/subtypes are defined internally by OpenVMS MIME and in optional MIME$MAILCAP.DAT files. The MIME command SHOW CONTENT lists the content types of files that can be displayed with the READ command. Other optional types are defined in MIME$MAILCAP.DAT file. MIME> SHOW CONTENT_TYPE See the READ command and SHOW CONTENT MIME$MAILCAP.DAT command for more information and its security implications.