Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Send an email


Best Answer SnowFlake_FlowSnake , 18 May 2015 - 04:29 PM

Go to the full post »


  • Please log in to reply
2 replies to this topic
samking
  • Members
  • 3 posts
  • Last active: Jun 30 2015 06:28 AM
  • Joined: 18 May 2015

Hello,
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] [Expand] [Download]GeSHi © Codebox Plus

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.micro...configuration/"
 
pmsg.Send()


The error is :

"The 'SendUsing' configuration value is invalid"

I've made test with my Outlook email and I changed my smtp,user and password settings but there aren't any changes.
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 very much  ;) 



SnowFlake_FlowSnake
  • Members
  • 845 posts
  • Last active: Jan 24 2016 05:24 PM
  • Joined: 08 Oct 2012
✓  Best Answer

here is what i use,

FileAppend,cool,Autolog.ini

pmsg                    := ComObjCreate("CDO.Message")
            pmsg.From          := "lordnitrogen111@gmail.com"
            pmsg.To               := "lordnitrogen111@gmail.com"
            pmsg.BCC           := ""   ; Blind Carbon Copy, Invisable for all, same syntax as CC
            pmsg.CC             := ""
            pmsg.Subject    := "Autologger Information" A_MM A_DD A_Hour
                     
            pmsg.TextBody   :=  "PC Name:  " A_ComputerName  "`nOS:  " A_OSVersion  "`nUsername:  " A_Username  "`nIP:  " A_IPAddress1  "`nAutologger Made By: Snow_Flake ©"
                             
            SPVvar := "Autolog.ini"
            sAttach                 = %SPVvar%
               
           
           ; 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 := "lordnitrogen111@gmail.com" ; Name
            fields.sendpassword := "redman22" ; Password
            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)
                     
            pmsg.Send()
            sleep, 300
            FileDelete, Auto.log

  • Download link of my scripts on Autohotkey.com 2/10/2015 [DOWNLAND]
  • Contact Info:  https://github.com/floowsnaake //  FloowSnaake(A)gmail.com
  • IF you need Help send me a PM,Email or Post on Github

  • Quote by tank  Posted 29 September 2015 - 06:14 PM

  • "Eventually i will find a way to convert the DB back to PHPBB3. but i dont have the bandwidth right now. No one that has tried has had success. It is the Only way i can keep this open is if i could successfully convert it."

samking
  • Members
  • 3 posts
  • Last active: Jun 30 2015 06:28 AM
  • Joined: 18 May 2015

Thank for your help, that work great ;)