第一次我使用了blat,它看起来可以正常工作,但是它为我打算发送的每封电子邮件发送两封电子邮件。脚本摘录如下:批处理文件:Blat发送2封电子邮件不是1
::If we have a problem we email from here
CALL :checkForFailures
:checkForFailures
IF EXIST %ERROR_FILE% CALL :email & EXIT /B 1
::pause
GOTO :eof
:email
IF %TOLOG%==Y (
BLAT -f [email protected] -to [email protected] -server myserver -subject "subject text" -body "Body text" -attacht
::%PROBLEM_LIST% >> %LOGFILE%
)
GOTO :eof
我试着运行此和有没有输出到日志文件。从cmd提示符运行良好,但只是在此脚本中发布。
感谢您的帮助
完美的谢谢。没有预料到:checkForFailures将被运行,除非拨打电话 – sapatos 2010-01-10 22:27:08
你可以接受答案,你知道吗? – Joey 2010-01-10 23:13:28
对不起乔伊只是发现了......或者你甚至应该这样做。 – sapatos 2010-09-26 23:18:32