tags:

views:

33

answers:

3

How to print the output of a batch script to the email client.

A: 

If you could use cygwin or linux you may sendmail it:

echo -ne "Subject:test \n\ncat $file " | sendmail mailTObeUSED@

Gadolin
A: 

To copy from cmd.exe:

  1. Right click the title bar.
  2. Choose "Mark".
  3. Select a rectangle with the mouse by holding the LMB at one corner and raising the LMB at the opposite corner.
  4. Right-click (RMB) to copy to the clipboard.

To write the output of a command to a file:

  1. Run mycommand.bat > filename.txt.
    Warning: If filename.txt exists, it will be overwritten!
  2. Open the newly created filename.txt.
strager
A: 

Not sure that I understand your needs, but you can use blat command-line utility for Windows to send email using SMTP (http://www.blat.net/).

blat -to to_email -f from_email -server smtp_server -body body_text -s subject_text -attacht att_file
Andrei Coscodan