It should be reasonably well noted where you need to modify settings in the script. I've marked most if not all locations with MODIFY to your environment requirements.

You need to download and make available BLAT.EXE the SMTP e-mailing application. You need to setup the locations and names of where it finds BLAT and the name/IP of your SMTP server, etc...

Please review the script - don't just try to run it.

After reviewing the script if you need more assistance please let me know.