Hi @ all I have tested every code and tried to fix it for me for example in the first code I had 2 Errors and marked them in the code can someone help?
Code:
pmsg := ComObjCreate("CDO.Message")
pmsg.From := """AHKUser"" <...@gmail.com>"
pmsg.To := "anybody@somewhere.com"
pmsg.BCC := "" ; Blind Carbon Copy, Invisable for all, same syntax as CC
pmsg.CC := "Somebody@somewhere.com, Other-somebody@somewhere.com"
pmsg.Subject := "Message_Subject"
;You can use either Text or HTML body like
pmsg.TextBody := "Message_Body"
;OR
;pmsg.HtmlBody := "<html><head><title>Hello</title></head><body><h2>Hello</h2><br /><p>Testing!</p></body></html>"
sAttach := "Path_Of_Attachment" ; can add multiple attachments, the delimiter is |
fields := Object()
fields.smtpserver := "smtp.gmail.com" ; specify your SMTP server
fields.smtpserverport := 465 ; 25
fields.smtpusessl := True ; False
fields.sendusing := 2 ; cdoSendUsingPort
fields.smtpauthenticate := 1 ; cdoBasic
fields.sendusername := "...@gmail.com"
fields.sendpassword := "your_password_here"
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(A_LoopField) <---- here
pmsg.Send() <---- and here
first Error was " the specified protocol is unkown"
the second after i fixed the first was "The message couldn´t be send to the SMTP-Server. The Serveranswer was "not available"
could it be that my SMTP-Server is wrong, because i don´t have gmail and tried to use it with gmx?
I only show that code because it was the one with only 2 Errors, i hope someone will answer and that the Topic isn´t too old.