Dear all,
I was using the following code with windows 7 and everything was working, but when I use the same code on windows 10, it stopped working and gave me the error found below further down;
Code that used to work for me in windows 7:
emailtosomeone = bla bla bla
pmsg := ComObjCreate("CDO.Message")
pmsg.From := """John Agius"" <something@gmail.com>"
pmsg.To := "somtehting@gmail.com"
pmsg.BCC := ""
pmsg.CC := ""
pmsg.Subject := "Message / Note"
pmsg.TextBody :=emailtosomeone
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 := "user@gmail.com"
fields.sendpassword := "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()
pmsg.Send()
In windows 10 it is giving me the following error;
Error: 0x800CCE05
Source: CDO.Message.1
Description: The requested body part was not found in this message
HelpFile (Null)
HelpContext: 0
Specifically from;
;bla bla bla working code
-------> pmsg.From :="""John Agius"" <something@gmail.com>"
Could someone please help me? I really need this to work for my job.
Thanks
John Agius
Sending emails (gmail) with autohotkey) Topic is solved
Re: Sending emails (gmail) with autohotkey)
I have the same problem with this. I have tried a lot of different script trying to use gmail and I always get error I am on windows 10 also. The error I am getting these day with the above script is 'Transport Error 0x800040217. The message could not be sent to the SMTP server. I am getting this at the pmsg.Send() command.
Anyone?
Bat
Anyone?
Bat
Re: Sending emails (gmail) with autohotkey)
I cannot even get to send without this error. In windows 7 and XP this exact same script works perfectly fine. I have update versions of Autohotkey,
Re: Sending emails (gmail) with autohotkey)
Windows 10 Pro (64 bit) - AutoHotkey v2.0+ (Unicode 64-bit)
Re: Sending emails (gmail) with autohotkey) Topic is solved
Error: Call to nonexistent function
---> 199. asm := CLR_CompileC#(c#, "System.dll")
---> 199. asm := CLR_CompileC#(c#, "System.dll")
Re: Sending emails (gmail) with autohotkey)
Sorry. You have to download CLR here and add the following line at the end of my script:RAMON LLOYDS wrote:Error: Call to nonexistent function
---> 199. asm := CLR_CompileC#(c#, "System.dll")
Code: Select all
#Include CLR.ahk
Windows 10 Pro (64 bit) - AutoHotkey v2.0+ (Unicode 64-bit)
Re: Sending emails (gmail) with autohotkey)
Solved. Thanks alot.
Re: Sending emails (gmail) with autohotkey)
Hi there! As I'm too late for this linkiPhilip wrote: ↑31 Jan 2017, 11:17Sorry. You have to download CLR here Broken Link for safety and add the following line at the end of my script:RAMON LLOYDS wrote:Error: Call to nonexistent function
---> 199. asm := CLR_CompileC#(c#, "System.dll")Let me know how it works out for you.Code: Select all
#Include CLR.ahk
(https dl.dropbox.com /u/20532918/Lib/CLR-1.2.zip) Broken Link for safety
would it be possible to provide a new one? A also need to send emails on WIN10. Thanks in advance!
Re: Sending emails (gmail) with autohotkey)
Windows 10 Pro (64 bit) - AutoHotkey v2.0+ (Unicode 64-bit)