Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
773 B

  1. use strict;
  2. use lib $ENV{ "RazzleToolPath" };
  3. require $ENV{ "RazzleToolPath" } . "\\sendmsg.pl";
  4. # simple utility to send a mail to JohnFogh MLekas and MikeCarl
  5. my( $Sender, $Subject, $Message, @Recips );
  6. my( $ExitCode, @FileLines, $Line, $MailFileName );
  7. $MailFileName = $ENV{ "TMP" } . "\\octomail.txt";
  8. $ExitCode = 0;
  9. $Sender = "MikeCarl";
  10. $Subject = "Octopus run complete";
  11. if ( open( INFILE, $MailFileName ) ) {
  12. @FileLines = <INFILE>;
  13. foreach $Line ( @FileLines ) { $Message .= $Line; }
  14. } else {
  15. print( "Failed to find mail.txt file, sending nothing.\n" );
  16. undef( $Message );
  17. $ExitCode++;
  18. }
  19. @Recips = ( 'MikeCarl', 'JohnFogh', 'MLekas' );
  20. sendmsg( $Sender, $Subject, $Message, @Recips );
  21. exit( $ExitCode );