2

从命令行使用 Outlook Express 发送电子邮件的最佳方式是什么?它必须是没有用户交互的自动化操作。附件中会有一些 .jpg 文件。谢谢。

4

4 回答 4

1

也许这篇文章很有帮助。它会预先填充新的电子邮件消息并包含文件。

于 2008-10-31T11:20:36.423 回答
1

是否真的需要使用 Outlook Express 发送电子邮件?

您不能使用第三方命令行电子邮件工具,还是需要它来使用 Outlook Express 的设置并让邮件最终出现在“已发送”文件夹中?

如果您可以使用第三方工具,absoluteTools SendMail CMD之类的工具可能会完成这项工作。

于 2008-10-31T11:33:14.340 回答
0

这个线程:我认为,从 Windows 脚本发送邮件可能会对您有所帮助。

于 2008-10-31T14:18:19.027 回答
0

Quick'n 肮脏的AutoIt脚本,您可以修改它以接受来自命令行的参数:

; Send a mail vía outlook "automation"

$sRcpt = "test@test.com"
$sSubj = "Test subject"
$sBody = "This is a test"
$sAttach = "g:\AutoIt\AnHoras.PRG"

If Not WinActivate ("[REGEXPTITLE:.*\- Outlook Express]") Then
    RunWait ("d:\Archivos de programa\Outlook Express\msimn.exe")   ; Set your path to the Outlook .exe
Endif

Send ("!anm")   ; Archivo->Nuevo->Mensaje (in spanish, sorry, I suppose that in english it will be File->New->Message)
Send ($sRcpt & "{Tab 3}")
Send ($sSubj & "{Tab}")
Send ($sBody)

If $sAttach <> "" Then
    Send ("!i{Enter}" & $sAttach & "{Enter}")      ; Insertar adjunto (Insert->Attachment)
EndIf

Send ("!a{Down}{Enter}")        ; Archivo->Enviar mensaje (File->Send message)
于 2008-10-31T20:27:41.590 回答