Chapter 9: Advanced e-mail (2 of 4) -- Encoding program files

Chapter 9: Advanced e-mail (2 of 4) -- Encoding program files


     Getting a file by e-mail becomes more complicated when you request a
program rather than a document.  Programs or other files that contain
unusual characters or lines longer than 130 characters (graphics files,
for example) require special processing by both the mail  server  to
ensure they are transmitted via e-mail.  Then you'll have to run them
through at least one converter program to put them in a form you can
actually use. To ensure that a program or other "non-mailable" file
actually gets to you, include another line in your e-mail message to the
server:

                encoder

This converts the file into an encoded form.  To decode it, you'll first
have to transfer the file message into a file in your home directory. If
you are using the simple mail program, go into mail and type

                w # file.name

where # is the number of the message you want to transfer and file.name
is what you want to call the resulting file.  In pine, call up the
message and hit your O key and then E.  You'll then be asked for a file
name. In elm, call up the message and hit your S key. You'll get
something that looks like this:

                =file.request

     Type a new file name and hit enter (if you hit enter without typing
a file name, the message will be saved to another mail folder, not your
home directory).
     Exit mail to return to your host system's  command line . Because
the file has been encoded for mail delivery, you now have to run a
decoder. At the command line, type

                uudecode file.name

where file.name is the file you created while in mail. Uudecode will
create a new, uncompressed file.  In some cases, you may have to run it
through some other programs (for example, if it is in "tar" form), but
generally it should now be ready for you to download to your own computer.
     One further complication comes when you request a particularly long
file.  Many Net sites can only handle so much mail at a time.  To make
sure you get the entire file, tell the mail server to break it up into
smaller pieces, with another line in your e-mail request like this:

                size 100000

     This gives the mail server the maximum size, in bytes, of each file
segment.  This particular size is good for  UUCP  sites. Internet and
 Bitnet  sites can generally go up to 300000.  When you get all of these
files in mail, transfer them to your home directory.  Exit mail and call
up each file in your host system's text processor and delete each one's
entire header and footer (or "signature" at the end).  When done with
this, at your host system's  command line , type

                cat file1 file2 > bigfile

where file1 is the first file, file2 the second file, and so on.  The >
tells your host system to combine them into a new megafile called bigfile
(or whatever you want to call it).  You can then run uudecode, tar, etc.
One word of caution, though: if the file you want is long enough that it
has to be broken into pieces, think of how much time it's going to take
you to download the whole thing -- especially if you're using a
 2400-baud  modem!