First arg to blat must be the name of a file to mail as the message body, or a hyphen (-) if you are using stdin or the -body switch. Blat is looking for a file named -to as you didn't follow the rules. [Smile]

Try something like:

c:\temp\blat\blat.exe - -to $EmailAdd -server $mailserver -subject "test from kix" -body "YAT" -f me@@here.com -q

Supplying a sender address (-f), along with the server address (which you have provided), is required if you don't create a default profile for blat to use i.e. with the -install switch. Even then, you will get the warning: "Failed to open registry key for Blat profile , using default.". Since you are supplying it all on the command line you can: ignore it, "install" blat, or use the -q to supress this and other messages.

Gerald W. Gaston

[ 29 July 2002, 21:41: Message edited by: gwgaston ]