postmail.bat 591 B

12345678910111213141516171819202122232425262728293031323334
  1. if "%1"=="" goto Usage
  2. if "%NOMAIL%"=="1" goto NoMail
  3. call %SCRIPTDIR%\mail\initmail.bat
  4. rem
  5. rem Create the mail and the batch file that will send the email.
  6. rem
  7. type %SCRIPTDIR%\mail\postmail.sed | sed.exe s/COMPUTERNAME/%COMPUTERNAME%/ | sed.exe s/BUILDNUM/%1/ > %POSTMAILFILE%
  8. rem
  9. rem Send the mail.
  10. rem
  11. %EXMAIL% -n %EXMAILSERVER% -m %MAILBOXFROM% -p %MAILBOXFROM% -t %MAILBOXTO% -y %MAILBOXTO% -s "Build %1 complete" -f %POSTMAILFILE%
  12. call %SCRIPTDIR%\mail\termmail.bat
  13. goto End
  14. :Usage
  15. echo Usage: postmail.bat [build number]
  16. set BUILDERROR=1
  17. goto End
  18. :NoMail
  19. goto End
  20. :End