First of all, remove "call" from the last line.
To redirect the output, use
pipe: '>' redirects the output to file, '>>' does the same appending the output to the existing file. For example, suppose you have the batch file BuildMyProject.bat. Then redirection would look like
BuildMyProject some optional build parameters here > outputFile.txt
You did not explain how you are going to send your mail. If you want to do it programmatically, you will find the facilities for the redirection of the console application (that includes batch files).
[EDIT]
This is how you can do it in PowerShell:
$output = & BuildMyProject.bat some optional build parameters
Don't forget '&' after '='. (You will also need to take care of the location of the batch file or its full path name.) After this line is executed, the output of the batch file will be copied to the variable
$output
.
—SA