I would like make a script with AutoHotkey than send an email to multi-users.
I've seen a lot of examples but that did'nt work for me
Here is my script :
Code: Select all
pmsg := ComObjCreate("CDO.Message")
pmsg.From := """AHKUser"" <...@gmail.com>"
pmsg.To := "myemail"
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><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 ;
fields.smtpusessl := True ; False
fields.sendusing := 2 ; cdoSendUsingPort
fields.smtpauthenticate := 1 ; cdoBasic
fields.sendusername := "mygmail_username"
fields.sendpassword := "mygmail_password"
fields.smtpconnectiontimeout := 250
schema := "http://schemas.microsoft.com/cdo/configuration/"
pmsg.Send()
I've made test with my Outlook email and I changed my smtp,user and password settings but there aren't any changes."The 'SendUsing' configuration value is invalid"
I use this smtp to send/mail dayli without any problem.
I have AutoHotkey v 1.1.22.00, if you could help me, thank you ery much