Hallo,
du kannst auch die CDO-Api nutzen.
Code: Select all
Emfa = "[email protected]"
path := "C:\Users\abc\Desktop\123.png" ; Pfad+Dateiname Anhang
pmsg := ComObjCreate("CDO.Message")
pmsg.From := "[email protected]"
pmsg.To := Emfa
pmsg.BCC := "" ; Blind Carbon Copy, Invisible for all, same syntax as CC
;pmsg.CC := "" ; [email protected], [email protected]
pmsg.Subject := "Test"
;pmsg.TextBody := ""
pmsg.HtmlBody := "<HTML><H2>Meldung!!!!</H2><BODY>Maschine:"
sAttach := path ; can add multiple attachments, the delimiter is |
fields := Object()
fields.smtpserver := "smtp.absender.de" ; specify your SMTP server
fields.smtpserverport := 25 ; 25
fields.smtpusessl := False ; False
fields.sendusing := 2 ; cdoSendUsingPort
fields.smtpauthenticate := 1 ; cdoBasic
fields.sendusername := "absender"
;fields.sendpassword := "xxxxxxxx"
fields.smtpconnectiontimeout := 60
schema := "http://schemas.microsoft.com/cdo/configuration/"
pfld := pmsg.Configuration.Fields
For field,value in fields
pfld.Item(schema . field) := value
pfld.Update()
;Loop, Parse, sAttach, |, %A_Space%%A_Tab%
pmsg.AddAttachment(path)
pmsg.Send()
return
weitere Hilfe: gogl und hier:
https://support.microsoft.com/de-de/help/310212/how-to-use-the-cdosys-dll-library-to-send-an-e-mail-message-with-attac
hier gibt es noch was zur powershell-funktion:
https://www.autohotkey.com/boards/viewtopic.php?f=9&t=31817&p=148376&hilit=cdo#p148376
Hallo,
du kannst auch die CDO-Api nutzen.
[code]Emfa = "
[email protected]"
path := "C:\Users\abc\Desktop\123.png" ; Pfad+Dateiname Anhang
pmsg := ComObjCreate("CDO.Message")
pmsg.From := "
[email protected]"
pmsg.To := Emfa
pmsg.BCC := "" ; Blind Carbon Copy, Invisible for all, same syntax as CC
;pmsg.CC := "" ;
[email protected],
[email protected] pmsg.Subject := "Test"
;pmsg.TextBody := ""
pmsg.HtmlBody := "<HTML><H2>Meldung!!!!</H2><BODY>Maschine:"
sAttach := path ; can add multiple attachments, the delimiter is |
fields := Object()
fields.smtpserver := "smtp.absender.de" ; specify your SMTP server
fields.smtpserverport := 25 ; 25
fields.smtpusessl := False ; False
fields.sendusing := 2 ; cdoSendUsingPort
fields.smtpauthenticate := 1 ; cdoBasic
fields.sendusername := "absender"
;fields.sendpassword := "xxxxxxxx"
fields.smtpconnectiontimeout := 60
schema := "http://schemas.microsoft.com/cdo/configuration/"
pfld := pmsg.Configuration.Fields
For field,value in fields
pfld.Item(schema . field) := value
pfld.Update()
;Loop, Parse, sAttach, |, %A_Space%%A_Tab%
pmsg.AddAttachment(path)
pmsg.Send()
return[/code]
weitere Hilfe: gogl und hier: [url]https://support.microsoft.com/de-de/help/310212/how-to-use-the-cdosys-dll-library-to-send-an-e-mail-message-with-attac[/url]
hier gibt es noch was zur powershell-funktion:
[url]https://www.autohotkey.com/boards/viewtopic.php?f=9&t=31817&p=148376&hilit=cdo#p148376[/url]