code_junkie

Outlook Express - sending e-mail from the command line

Nov 12th, 2011
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. ; Send a mail vía outlook "automation"
  2.  
  3. $sSubj = "Test subject"
  4. $sBody = "This is a test"
  5. $sAttach = "g:AutoItAnHoras.PRG"
  6.  
  7. If Not WinActivate ("[REGEXPTITLE:.*- Outlook Express]") Then
  8. RunWait ("d:Archivos de programaOutlook Expressmsimn.exe") ; Set your path to the Outlook .exe
  9. Endif
  10.  
  11. Send ("!anm") ; Archivo->Nuevo->Mensaje (in spanish, sorry, I suppose that in english it will be File->New->Message)
  12. Send ($sRcpt & "{Tab 3}")
  13. Send ($sSubj & "{Tab}")
  14. Send ($sBody)
  15.  
  16. If $sAttach <> "" Then
  17. Send ("!i{Enter}" & $sAttach & "{Enter}") ; Insertar adjunto (Insert->Attachment)
  18. EndIf
  19.  
  20. Send ("!a{Down}{Enter}") ; Archivo->Enviar mensaje (File->Send message)
Add Comment
Please, Sign In to add comment