INDEX

 - description
 - installation
 - what's new in this version
 - usage
 - examples
 - future improvements
 - copyright
 - authors
 - contributors
 - note


DESCRIPTION:

Blat is a Public Domain (generous aren't we?) Windows NT console utility that
sends the contents of a file in an e-mail message using the SMTP protocol.
Blat is useful for creating scripts where mail has to be sent automatically
(CGI, backups, etc.) To use Blat you must have access to a SMTP server via
TCP-IP. Blat uses the a DLL ("gensock" or "gwinsock") from WinVN, the public
domain usenet newsreader for windows. Blat can store a default SMTP server
address and a default "From:" field in the registry. The server's address can
be overriden using the -server flag, and the "From:" address using the -f
flag. Input from the console (stdin) can be used instead of a disk file (if
the special filename '-' is specified). Blat can also "carbon copy" and
"blind carbon copy" the message. Impersonation can be done with the -i flag
which puts the value specified in the "From:" line, however when this is done
the real senders address is stamped in the "Reply-To:" and "Sender:" lines.
This feature can be useful when using the program to send messages from NT
users that are not registered on the SMTP host.


INSTALLATION:

If you are upgrading from an versions 1.2-1.5 simply copy Blat.exe over the 
old one.

If you are upgrading from Blat 1.1 or 1.0 (phew!) or you never used Blat before
you must follow these steps:

1) Copy the file "Blat.exe" to your "\WINNT\SYSTEM32" directory, or to any
   other directory in your path.

2) Run "Blat -install yourhost.site.blah.blah youruserid@site.blah.blah"

WHAT'S NEW IN THIS VERSION

 - Blat now closes connections with SMTP servers more gracefully
   (i.e. it listens to port 25 until SMTP server sends goodbye)
 - Blat no longer includes a CTRL-Z character at the end of a 
   message that was typed from the console
 - Blat no longer outputs an error message when it is first 
   installed
 - -hostname <hst> option to select the hostname used to send the 
   message
 - Two binary-encoding options:
        -base64     to encode the message in Base64 
        -uuencode   to encode the message in UUEncode
   with either of these two options Blat can now be used to send
   binary files, a feature much awayted.
 - This binary executable of Blat is statically linked to 
   gensock. This means that Blat no longer needs the file gensock.dll


USAGE: 

syntax:
  Blat <filename> -t <recipient> [optional switches (see below)]
  Blat -install <server addr> <sender's addr> [-q]
  Blat -h [-q]
-install <server addr> <sender's addr>: set's default SMTP server and sender
<filename>     : file with the message body ('-' for console input,end with ^Z)
-t <recipient> : recipient list (comma separated)
-s <subj>      : subject line
-f <sender>    : overrides the default sender address (must be known to server)
-i <addr>      : a 'From:' address, not necessarily known to the SMTP server.
-c <recipient> : carbon copy recipient list (comma separated)
-b <recipient> : blind carbon copy recipient list (comma separated)
-h             : displays this help.
-mime          : MIME Quoted-Printable Content-Transfer-Encoding.
-q             : supresses *all* output.
-server <addr> : overrides the default SMTP server to be used.
-hostname <hst>: select the hostname used to send the message
-uuencode      : Send (binary) file UUEncoded
-base64        : Send (binary) file using base64 (binary Mime)
Note that if the '-i' option is used, <sender> is included in 'Reply-to:'


EXAMPLES:

Blat -install smtphost.bar.com foo@bar.com          // Sets host and userid
Blat -install smtphost.bar.com foo                  // Sets host and userid
Blat -install smtphost.bar.com                      // Sets host only

Blat myfile.txt -s "A file for pedro" -t foo@bar.com
// Sends a file with subject line "A file for pedro"

Blat myfile.txt -s "A file for pedro" -t foo@bar.com -q
// Sends a file with subject line "A file for pedro" and does not print
// informative messages on the console

Blat myfile.txt -s "A file for mark" -t fee@fi.com -f foo@bar.com
// -f option overrides the default sender

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

Blat myfile.txt -s "animals" -t fee@fi.com -c "moo@grass.edu,horse@meadow.hill"
// -c mails carbon copies to users moo@grass.edu and horse@meadow.hill

Blat.exe BLAT17I.ZIP -s "file to gil" -t foo@bar.com -base64
// Sends the binary file BLAT17I.ZIP to Gilles in MIME Base 64 format

Blat.exe BLAT17I.ZIP -s "file to gil" -t foo@bar.com -uuencode
// Sends the binary file BLAT17I.ZIP to Gilles in the old UUEncode format

Blat myfile.txt -t fee@fi.com -server smtp.domain.com:6000
// sends the message through SMTP server smtp.domain.com at port 6000

Blat myfile.txt -t fee@fi.com -hostname friend
// tells the SMTP that this computer is called "friend"
      

COPYRIGHT

License to use Blat

The authors of Blat have placed it in the public domain. This means you
can use it free of charge for any purpose you like, with no conditions being
placed on its use by us. The source code is also available free of charge and
under the same conditions as the executables.

You have permission to modify, redistribute, hoard, or even sell Blat in its
executable or source form. If you do sell Blat, though, we'd appreciate it if
you'd provide your own support (and send us a free copy).  We cannot take any
support load for Blat (we've got better things to do). 

Various bits of the source code are copyright by other people/organizations.
Look in the source code for copyright ownership.

The authors of the package are not responsible for any damage or losses that
the usage of Blat may cause. We are especially not responsible for the misuse
of the SMTP (or other) mail system.


AUTHORS

Pedro Mendes   (prm@aber.ac.uk)
Mark Neal      (mjn@aber.ac.uk)
Gilles Vollant (info@winimage.com)


CONTRIBUTORS

We'd like to thank:

the WinVN team                       - wrote gensock.dll and the excellent WinVN
                                       newsreader from which we copied most of
                                       Blat's code (PD apps are nice!)
Beverly Brown (beverly@datacube.com) - fixed the argument parsing
Axel Skough (axel.skough@scb.se)     - added the MIME code, fixed the CC/BCC
                                       bug and added the return code

And several others who have contributed pieces of code, even though these have
not made it into the program



NOTE

Almost probably this will be the last version of Blat.
