如何从DOS批处理命令发送电子邮件? [英] How do I send an email from a DOS batch command?
问题描述
我在DOS中有一个批处理文件,做一些检查,我需要触发电子邮件时,它的完成。我在interwebz上找到了一些解决方案,但大多数是第三方或只是简单地在Outlook中打开一个新的消息。我需要命令发送一封电子邮件,没有任何人为的互动。
我们在这里使用MS Exchange,如果这很重要。
谢谢!
假设:
<
您只需发送一封简单的电子邮件Telnet。此链接显示了如何执行此操作的示例: http://www.yuki -onna.co.uk/email/smtp.html
如果假设2或3错误,您可以写一个命令行SMTP客户端发送simples电子邮件很容易在许多语言,然后从您的批处理文件中调用它。
I have a batch file in DOS that does some checking and I need to fire off an email when its done. I've found a few solutions on the interwebz but most of them are 3rd party or just simply open up a new message in Outlook. I need the command to send an email in its entirety without any human interaction.
We use MS Exchange here, if that matters.
Thanks!
Assuming:
- Your Exchange server accepts emails via SMTP on port 25.
- You want to send a simple text only email without attachments.
- It's possible to drive telnet (or a similar telnet client) from a batch file.
You could just send a simple email via Telnet. This link shows an example of how to do it: http://www.yuki-onna.co.uk/email/smtp.html
If assumption 2 or 3 is wrong, you could write a command line SMTP client for sending simples emails fairly easily in many languages and then call it from your batch file.
这篇关于如何从DOS批处理命令发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!