Hi
There are countless threads on this very topic, however none that I found worked (they used to in the past) and the error is related to CD0 Specified protocol not known. I would post the img but IMG is turned off for me, you can view it here by the post hamncheese https://autohotkey.com/board/topic/6081 ... k-l/page-5
For example, these solutions also no longer work
https://autohotkey.com/board/topic/8116 ... -gmailcom/
So after spending days trying solution after solution I decided it's time to read out on the forum. Maybe someone has something that will work for sending gmail directly from the script (in other words, if X is true send an email with gmail, no attachment needed and no cc/bcc) just plain text.
I hope someone can help.
Thank you
Use AutoHotKey to send Email via Gmail Topic is solved
Re: Use AutoHotKey to send Email via Gmail
In case you won't be able to accomplish this on your own using COM ...
https://www.raymond.cc/blog/sending-ema ... ification/
https://www.raymond.cc/blog/sending-ema ... ification/
- divanebaba
- Posts: 805
- Joined: 20 Dec 2016, 03:53
- Location: Diaspora
Re: Use AutoHotKey to send Email via Gmail
Hi.
My example could look a little bit tricky but after so many fails it worked fine.
The thread is in german language. If you have not visited school in Germany, you should have no problems to understand.
You only need Original Microsoft Powershell and you have to allow gmail to accept bit less secure login.
Please look E-Mail versenden ohne Zusatzprogramm.
Working script is discarded at due from 23 Jun 2017, 09:38.
All links to necessary additions are even discarded there too.
Bol şanslar. Try even to translate this.
My example could look a little bit tricky but after so many fails it worked fine.
The thread is in german language. If you have not visited school in Germany, you should have no problems to understand.
You only need Original Microsoft Powershell and you have to allow gmail to accept bit less secure login.
Please look E-Mail versenden ohne Zusatzprogramm.
Working script is discarded at due from 23 Jun 2017, 09:38.
All links to necessary additions are even discarded there too.
Bol şanslar. Try even to translate this.
Einfach nur ein toller Typ.
Re: Use AutoHotKey to send Email via Gmail
I successfully used this script on windows 10:
https://autohotkey.com/board/topic/6081 ... ery-ahk-l/
I had to go into Gmail->My Account->Sign-In & Security->Allow less secure apps: ON (way at bottom of page).
https://autohotkey.com/board/topic/6081 ... ery-ahk-l/
I had to go into Gmail->My Account->Sign-In & Security->Allow less secure apps: ON (way at bottom of page).
Re: Use AutoHotKey to send Email via Gmail
That method no longer works in windows 10, thanksdmatch wrote:I successfully used this script on windows 10:
https://autohotkey.com/board/topic/6081 ... ery-ahk-l/
I had to go into Gmail->My Account->Sign-In & Security->Allow less secure apps: ON (way at bottom of page).
Re: Use AutoHotKey to send Email via Gmail
I just tried my implementation of it and it still works. Might be something in Win 10 settings causing different results or a win 10 update that I didn't get?
Here is what I actually ran as a script. Personal info not included:
I have not sent an email to anyone other than myself. Perhaps that is why it works for me. I also have not tested an attachment.
Here is what I actually ran as a script. Personal info not included:
Code: Select all
pmsg := ComObjCreate("CDO.Message")
pmsg.From := """Your From Name"" <Your gmail address>"
pmsg.To := "[email protected]" ;Sent an email to myself as a test. Perhaps that's why it worked for me.
pmsg.BCC := "" ; Blind Carbon Copy, Invisable for all, same syntax as CC
pmsg.CC := ; "[email protected], [email protected]"
pmsg.Subject := "This is a test"
;You can use either Text or HTML body like
pmsg.TextBody := "Testing"
;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 := "YourPassword"
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()
Re: Use AutoHotKey to send Email via Gmail Topic is solved
that worked thank you!
Who is online
Users browsing this forum: Descolada, Hema Elkady and 258 guests