【问题标题】:Run TELNET commands in a batch批量运行TELNET命令
【发布时间】:2023-03-28 15:39:01
【问题描述】:

您好,我在批处理文件 email.bat 中使用以下 TELNET 命令。但是当我运行批处理时,我收到了消息

“220 edcmsgmra02.domain.com ESMTP 星期日,2015 年 12 月 27 日 07:00:18 -0500”

如果我手动运行每一行,则该命令正在运行。你能帮我一次性运行下面的命令吗?

TELNET edcsmtp.emea.domain.com 25

HELO emea.domain.com 

mail from: admin@domain.com 

rcpt to: Vijayn@domain.com 

data 
SUBJECT: Stock File Alert!!!!!

File is not received in the directory. Kindly place the files to process
.
QUIT

【问题讨论】:

标签: batch-file cmd


【解决方案1】:

没有简单的方法来编写 Windows telnet 客户端的脚本。您可以使用VBS with SendKeys 来控制客户端或使用third party telnet scripting tool,但无法直接向其发送命令。

如果您只想发送电子邮件提醒,请尝试SendEmail。 SendEmail 是一个轻量级的命令行 SMTP 电子邮件客户端。使用简单,功能丰富。

【讨论】:

    猜你喜欢
    • 2016-05-26
    • 2013-10-10
    • 1970-01-01
    • 2013-01-15
    • 1970-01-01
    • 2012-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多