CLMail 0.4
15Nov95
==========

CLMail is a console-mode utility for sending SMTP mail from Win32 systems.  It
uses a small subset of the UNIX mail(1) command syntax for sending mail
to another system via SMTP.  Unlike mail(1), CLMail does the SMTP protocol
itself, rather than handing the job off to sendmail(8).

If no -f option is specified, CLMail will read the message to be sent from 
stdin.  If not re-directed from a file or pipe, the user must type in the 
message and enter a ^Z to exit and send the message.

CLMail was inspired by (actually a derivative of) Blat, which in turn is an
extraction of the SMTP mail routines from WinVN.  Blat was placed in the
Public Domain, although the derived code from WinVN retains it's original
copyright.  All of the WinVN code is (will be) segregated into seperate source
files to make it easier to keep track of who's is what.

CLMail will be distributed under a license similar to the GNU General Public
License (except, of cource, for the WinVN-derived code).  Basically, this means
that if you use CLMail and change it and distribute your changes, you must
also make the source code available.

Operational Requirements
------------------------
Due to it's WinVN heritage, WinVN's gensock DLL is required.

A Registry entry is generated when the program is used with the -R flag.
This stores the address of the SMTP server, and an address for the current
user in HKEY_CURRENT_USER/Software/Local/CLMail.  These entries are required
for correct operation of CLMail.

Impersonation can be done with the -i flag which puts the value specified in
place of the senders address in the "From:" line of the header, however if this
is done the real senders address is stamped in the "Reply-To:" and "Sender:"
lines. This can be useful when using the program to send message from NT users
that are not registered on the SMTP host.


Syntax
------

CLMail ver 0.4: Send mail via SMTP

CLMail <recipient> [-c <recipient>] [-f <filename>] [-s <subject>]
     [-i <address>] [-l <sender>]
CLMail -R <server address> <sender>
CLMail -h

<recipient>    the recipient's address
-c <recipient> the carbon copy recipient's address
-f <filename>  a file to be sent as the message 
-s <subject>   the subject line
-i <address>   a 'From:' address, not necessarily known to the SMTP server.
-l <sender>    the sender's login name (must be known to the SMTP server)

-R <server address> <sender>    set's the address of the SMTP server to be used

-h      displays this help.

Note that if the '-i' option is used, <sender> is included in 'Reply-to:'
and 'Sender:' fields in the header of the message.


Installation
------------

To install CLMail, perform the following steps:

1. Copy clmail.exe and gensock.dll to a directory on your path.  (If you
   already have WinVN installed, you can probably use the gensock.dll
   that is already installed.)

2. Run "CLMail -R smarthost.domain.com username@site.domain.com"


Examples
--------

CLMail -R smtphost.bar.com foo@bar.com          // Sets host and userid
CLMail -R smtphost.bar.com foo                  // Sets host and userid
CLMail -R smtphost.bar.com                      // Sets host only

CLMail -f update.lst -s "Latest CLMail changes" foo@bar.com
  Sends file update.lst with a subject line "Latest CLMail changes" to user foo

CLMail -f myupdate.lst -s "You forgot this" fee@fi.com -l foo@bar.com
  -l option overrides the default sender

CLMail -f myfile.txt -s "A file for pedro"  foo@bar.com -i "devil@fire.hell"
  -i replaces "From:" line address (but leaves Reply-To: and Sender: lines)

dir | CLMail -s "file list" fee@fi.com -c "moo@grass.edu,horse@meadow.hill"
  sends directory listing to fee;
  -c mails carbon copies to users moo@grass.edu and horse@meadow.hill


Copyright
---------

CLMail is copyright 1994 Dean Troyer, except of course for the WinVN-derived
code with retains it's original copyright.


License
-------

#include <GPL>


Author
------

CLMail was originally hacked from Blat by Dean Troyer (Dean.Troyer@AZ.Honeywell.COM)
The Blat authors are Mark Neal (mjn@aber.ac.uk) and Pedro Mendes (prm@aber.ac.uk).

