2008-10-31 207 views

回答

1

也许this post是有帮助的。它会预先填充新的电子邮件消息并包含文件。

1

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

难道你不能使用第三方命令行电子邮件工具,或者你需要它来使用Outlook Express的设置和邮件结束在发送文件夹?

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

0

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

; Send a mail vía outlook "automation" 

$sRcpt = "[email protected]" 
$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)