Go to the first, previous, next, last section, table of contents.


4.1.3 Printing Mails

The message export facility can also be used to print a message. On all systems except Unix, this is done by printing to the special printer device called `PRN'. That is, in order to print a mail, press Alt-W and enter `PRN' as name of the file to export the message to. Do not forget to enter `,t' after the file name in order to switch to text mode (only text mode will yield good results for printing a mail):

Example for printing on OS/2, DOS or Windows:
*---------------------- Export File ----------------------*
| Name of file to export?                                 |
| PRN,t                                                   |
|                      Ok    !   Cancel  !                |
|                   **********  **********                |
*---------------------------------------------------------*

On Unix, printing is performed by piping the mail into the lpr program. Fortunately, MsgEd TE also supports piping. Simply prefix the "filename" with a pipe character (the broken vertical bar), and the rest of the string (except for the comma and the format character) will be interpreted as a command to be executed by the shell. Again, do not forget to switch to text mode by appending `,t' to the command.

Example for printing on Unix:
*---------------------- Export File ----------------------*
| Name of file to export?                                 |
| |lpr - ,t                                               |
|                      Ok    !   Cancel  !                |
|                   **********  **********                |
*---------------------------------------------------------*

You can of course also use the pipe character for piping mails through other programs than lpr. For example, you could pipe cooking recipes from an echomail area devoted to cooking through a perl or rexx script that archives them in a database.

As a side note, piping does also work in the OS/2 and Windows versions of MsgEd TE if they have been compiled with a GNU compiler supporting the popen command. (The binary versions that I have released are).


Go to the first, previous, next, last section, table of contents.