【发布时间】:2013-05-28 00:47:10
【问题描述】:
我正在尝试使用此命令行客户端从批处理脚本定期发送电子邮件附件
http://caspian.dotconf.net/menu/Software/SendEmail
它的命令非常简单
sendEmail -t abc@gmail.com -u hellp -f abd@nus.edu.sg -m world -s smtp.nus.edu.sg -xu nusstu\a123456 -xp helloworld! -a C:\Users\ll\Desktop\Quotes.docx
奇怪的是,如果我在命令提示符下键入该行,它工作得非常好。我能 接收带有附件的电子邮件。
但是,当我将它放入批处理脚本时,例如
:email
sendEmail -t abc@gmail.com -u hellp -f abd@nus.edu.sg -m world -s smtp.nus.edu.sg -xu nusstu\a123456 -xp helloworld! -a C:\Users\ll\Desktop\Quotes.docx
goto:eof
我在批处理文件中调用这个子例程,输出显示
SMTP:AUTH authentication to smtp.nus.edu.sg:25 failed.
我检查过了。没有错字,有人可以帮我看看有什么区别吗?为什么相同的命令在命令行中有效,但在脚本文件中引起问题?
谢谢
【问题讨论】:
-
你在使用延迟扩展吗?
-
是的,你拯救了我的一天!我确实把它放在了开头,一旦删除,问题就解决了!非常感谢!
标签: command-line batch-file smtp sendmail