Mailing files

If you want to send a file to someone by e-mail -- a log file containing the source code and test runs for a program that you want to turn in -- here's an easy way to do it. Let's say that typical user George Spelvin wants to mail a file named frogs.log to stone@math.grin.edu. He brings up an hpterm window and issues the command

elm stone@math.grin.edu < frogs.log

The symbol < here is essential; it means ``take the body of the message from the file that follows.''

Here's the way it shows up in my mail reader:

From: George Spelvin <spelvin@math.grin.edu>
To: stone@post.math.grin.edu
Subject: no subject (file transmission)
Date: Mon, 31 Feb 1997 13:05:30 CST

Script started on Mon Feb 31 12:28:13 1997
post% cat frogs.ss
;;; frogs.ss -- an amphibian tallier
;;; George Spelvin
;;; February 31, 1997

(And so on.)

If you want, you can even have elm fill in the ``Subject'' line of the header for you, by adding the option -s followed by the desired subject header (enclosed in double quotes).

elm -s "Amphibian tallier" stone@math.grin.edu < frogs.log

Now the header will look like this in my mail reader:

From: George Spelvin <spelvin@math.grin.edu>
To: stone@post.math.grin.edu
Subject: Amphibian tallier
Date: Mon, 31 Feb 1997 13:08:41 CST

This document is available on the World Wide Web as

http://www.math.grin.edu/courses/Scheme/spring-1997/mailing-files.html

created February 20, 1997
last revised May 28, 1997
John David Stone (stone@math.grin.edu)