Mail
----
Builds a single mail using either a crude built-in editor or the 
external editor of your choice for text input. Alternatevely, it can 
send an existing file, MIME encoding as required, and mail created can 
be logged. Designed to run in less than 64k (currently <32).

Intended to be the mailer for YAN online, but since it's run by shelling 
out it can also run stand-alone. There are two versions:
1. the COM version runs in the absolute minimum of memory, lacks mail
   logging and the external editor option, but in *very* tight memory is
   less robust.
2. the EXE is the full version and is slightly more robust, but does need
   somewhat more memory to run.

It will ask for an address (if one is not provided on the command line) 
and a subject. The address can be either a full address or an alias 
which can hold several addresses within the line length limit, separated 
by a *single* space a la PCElm/Snews, but on a *single* line and it is 
not case-sensitive. Max line length is 255 chrs, although the internal 
editor will wrap on the next space after col 65 or at 79, willynilly, 
and it won't allow lines to be concatenated if the result is over 79. 
Multiple mails are sent via a "smarthost".

Note: If you define an external editor in the rc file, the EXE version
      it will try to use it, but if there's isn't enough memory for it
      to run the internal one will be used. If run from YAN, remember
      that you're shelling twice if you use an external editor - not
      only is this bloody inefficient in memory terms, but it's possible
      that YAN's multitasking could struggle, although in plain DOS it
      doesn't.
      The only file locking is on the sequence file. This *ought* to be
      the only point of contact with SMTP activity, but I may be wrong.

It will always ask for a file, but, if none is given, throw you into the 
editor. Ctrl-c will abort from the internal editor. If a filename is 
given, but is not found, further attempts are offered. Enter without any 
data will abort the program. Empty addresses or subjects also abort, but 
*any* entry will be accepted as valid.

Command line:	MAIL <address>
? as an address gives what passes for help.

Needs mail.rc setting up, but after that it can run from anywhere.
If you'll use a sig, that needs creating as well and as it is just
copied onto the end of the mail body it should contain the separator
"-- " (not "--").

If a logfile is specified, mail is logged to it (EXE only).
If an editor is specified, it will be used if possible (EXE only).
see sample rc file.

Run from the command prompt, you'll get messages about whatever
problems are encountered. However, online you won't have time to read
them before the shell returns so error codes are returned for display
after the Mail command. Following mailto: links you won't even see
that much.

Return codes:
-1	- unable to lock sequence file
0	- OK
1	- help or mail no sent
2	- can't find rc file
3	- no address provided
4	- no subject provided
5	- not enough memory
6	- file not found
                                 -=O=-

Support:
None, unless it's a good idea I can pinch or a bug so embarrassing I
feel compelled to deal with it.
    
Contact:
If you feel the need for contact, yan@ukgateway.net will reach me.

