with the code
Code: Select all
pmsg := ComObjCreate("CDO.Message") ; Do not change
pmsg.From := """Mr Big"" <[email protected]>"
pmsg.To := "[email protected]"
pmsg.BCC := "" ; Blind Carbon Copy, Invisible for all, same syntax as CC
pmsg.CC := ""
pmsg.Subject := "E-mail Test"
pmsg.TextBody := "Test of sending e-mail directly from AutoHotkey."
; Remove semicolon to activate attachment feature
; 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 := "[email protected]"
fields.sendpassword := "XXXXXXX"
fields.smtpconnectiontimeout := 60
schema := "http://schemas.microsoft.com/cdo/configuration/" ; Do not change
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)
pmsg.Send()