on system b install smtp from "add remove programs" --> add remove windows programs , once you have smtp installed check to see if it works by opening a cmd and typing telnet 127.0.0.1 25 , you should see a blank screen with with a header.
type crtl+[ and type quit.
use this link the make the script (copy to a batch file with .bat extension) :
http://www.paulsadowski.com/WSH/cmdmail.htmput the script in a seperate directory (i.e X folder) and follow those instruction to configure execution:
# In the Remote Desktop Connection window, click Options.
# On the programs tab, under Start a program, click Start the following program on connection.
# In the program path and file name box, type the path and file name of the program that you want to run after the connection is created.
# Optionally, in the Start in the following folder: box, type the path to the working directory of the program.
didn't have the time to check - hope it works..