pmsg := ComObjCreate("CDO.Message")
pmsg.From := """AHKUser"" <[email protected]>"
pmsg.To := "[email protected]"
pmsg.BCC := "" ; Blind Carbon Copy, Invisable for all, same syntax as CC
pmsg.CC := "[email protected], [email protected]"
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><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 := "[email protected]"
fields.sendpassword := "your_password_here"
fields.smtpconnectiontimeout := 60
schema := "http://schemas.microsoft.com/cdo/configuration/"
pfld := pmsg.Configuration.Fields
pfld.Item(schema . field) := value
pfld.Update()
Loop, Parse, sAttach, |, %A_Space%%A_Tab%
pmsg.AddAttachment(A_LoopField)
pmsg.Send()
sending email script
Forum rules
Please do not advertise any websites here or shorten your links in the Lounge. Any spam will be deleted and accounts banned.
Please do not advertise any websites here or shorten your links in the Lounge. Any spam will be deleted and accounts banned.