Monday, 29 June 2009

Send smtp emails from command line (bmail.exe)

I've discovered a free command line tool which sends SMTP emails from a command line and therefore can be used within batch files. It can also take environment variables as parameters. For example, to send an email when a server is booted, create a batch file with the following line:
bmail.exe -s 192.168.1.7 -t admin@domain.com -f helpdesk@domain.com -a "%computername% has just booted" -b "The computer has started up. Please investigate."
You can then just copy the batch file and bmail.exe to your SYSVOL folder on the domain controller(s) and create a GPO to run the batch file on startup.

You can obtain the tool from the following webpage: http://www.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm

No comments:

Post a Comment