Send Email Directly from AutoHotkey
Re: Send Email Directly from AutoHotkey
Nice script. How to realise NOREPLY emails?
Re: Send Email Directly from AutoHotkey
Works great but I have a question. I have nice email templates that were created via HTML. (I use CloudHD email templates plugin) Is there a way to have the email sent in an HTML format? Meaning, that in ahk I would either paste the HTML or have ahk read the HTML from the HTML template file?
Re: Send Email Directly from AutoHotkey
Very nice thanks a lot! I've been wondering about that for a while.
Here's a snippet how I made a working attachment test:
Here's a snippet how I made a working attachment test:
Code: Select all
; Attachment feature separated by |
facture := A_ScriptDir . "\Facture-18.pdf"
doc1 := A_ScriptDir . "\doc1.pdf"
doc2 := A_ScriptDir . "\doc2.pdf"
sAttach := facture "|" doc1 "|" doc2 ; can add multiple attachments (the delimiter is "|" )
Re: Send Email Directly from AutoHotkey
Code: Select all
http://schemas.microsoft.com/cdo/configuration/
This script wont work without that URL.
- JoeWinograd
- Posts: 2214
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Send Email Directly from AutoHotkey
I'm hoping for "temporarily unavailable", as a removal or a name change would break a gazillion programs/scripts. Give it a while and try again later.bdrumm wrote:This script wont work without that URL.
Btw, here's a thread that I posted about CDO, but it has a PowerShell solution that does not rely on http://schemas.microsoft.com/cdo/configuration/, so you may want to give that a try:
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=67283
Regards, Joe
Re: Send Email Directly from AutoHotkey
Is this really a possible way to solve this on?
Re: Send Email Directly from AutoHotkey
New user here. Got the Gmail to work...also had to manually select "allow less secure apps," but did anyone else see that Gmail has a notification above this option now that says "As of May 31, 2022 we will no longer allow less secure apps" or something like that? Anyone have a good backup? I tried multiple other email clients, and perhaps just dont have the script/ports/etc right, but I basically tried both the original posters code (that works with Gmail), plus I have tried the reposters variants where TLS should work (vs SSL), but so far cant get Outlook, AOL, Yahoo, or Yandex to work, despite making sure I am using the correct SMTP address and the correct port. Port 25 is blocked for me on ATT Fiber. Any thoughts?
-
- Posts: 6
- Joined: 12 Apr 2022, 12:57
Re: Send Email Directly from AutoHotkey
hi, i'm noob. I tried the source, but an error occurred and I don't know how to solve it, so I leave a question.
The message could not be sent to the SMTP server. The transmission error code is 0x80040217 . The server response is not available .
---> 034: pmsg.Send()
The message could not be sent to the SMTP server. The transmission error code is 0x80040217 . The server response is not available .
---> 034: pmsg.Send()
Re: Send Email Directly from AutoHotkey
What is not working?
Or more importantly what is it you want to do?
(some code?)
Or more importantly what is it you want to do?
(some code?)
Re: Send Email Directly from AutoHotkey
When I use gmail with the provided code, it works well (sending an email when the "if" occurs). So this first one is working...but at the end of this month I dont think it will anymore given the notice I saw in Gmail about no longer allowing "less secure apps."
Code: Select all
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 := "username@gmail.com"
fields.sendpassword := "Password"
fields.smtpconnectiontimeout := 60
schema := "http://schemas.microsoft.com/cdo/configuration/" ; Do not change
Code: Select all
fields := Object()
fields.smtpserver := "smtp-mail.outlook.com" ; specify your SMTP server
fields.smtpserverport := 587
fields.sendtls := True
fields.sendusing := 2 ; cdoSendUsingPort
fields.smtpauthenticate := 1 ; cdoBasic
fields.sendusername := "username@outlook.com"
fields.sendpassword := "Password"
fields.smtpconnectiontimeout := 60
schema := "http://schemas.microsoft.com/cdo/configuration/" ; Do not change
fields := Object()
fields.smtpserver := "smtp-mail.outlook.com" ; specify your SMTP server
fields.smtpserverport := 465 ; 25
fields.sendtls := True
fields.smtpusessl := True ; False
fields.sendusing := 2 ; cdoSendUsingPort
fields.smtpauthenticate := 1 ; cdoBasic
fields.sendusername := "username@outlook.com"
fields.sendpassword := "Password"
fields.smtpconnectiontimeout := 60
schema := "http://schemas.microsoft.com/cdo/configuration/" ; Do not change
Last edited by BoBo on 13 Jun 2022, 23:15, edited 1 time in total.
Reason: Added [code][/code]-tags.
Reason: Added [code][/code]-tags.
Re: Send Email Directly from AutoHotkey
@tantomed
im having the same issue. gmail stop working. tried many other smpt mails and none has workd. did you find some alternative?
im having the same issue. gmail stop working. tried many other smpt mails and none has workd. did you find some alternative?
Re: Send Email Directly from AutoHotkey
I have not tried using Thunderbird with AHK (but it should work)
Re: Send Email Directly from AutoHotkey
Gmail should still work (it does for me) when you use an App password:
viewtopic.php?f=76&t=102434&p=455402#p455548
viewtopic.php?f=76&t=102434&p=455402#p455548
Re: Send Email Directly from AutoHotkey
thank you, just created a app password and it is working again. uhuuuuu
lblb wrote: ↑14 Jun 2022, 04:14Gmail should still work (it does for me) when you use an App password:
viewtopic.php?f=76&t=102434&p=455402#p455548
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 187 guests