• Become a Power user Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Painlessly switch from V1 to V2


Previously  CDO messeage can send emails using Gmail server using app passwords which is now replaced by passkeys. You can however your own smtp server and send email.

Updated on 2024/06/11 Add V2

Email Sender using CDO with AutoHotkey

Email Sender using CDO and Gmail with AutoHotkey

The key idea of the video is to demonstrate how to send emails using CDO and Gmail with AutoHotkey, including configuring settings, sending HTML and plain text emails, attaching files, and automating the process.

  • 00:00 The script demonstrates how to send emails using CDO and Gmail, with instructions on finding the SMTP server settings.
  • 00:31 To send emails using CDO and Gmail with AutoHotkey, you need to create a special app password in your Gmail settings and use it instead of your regular password.
  • 01:13 The speaker explains how to configure and send emails using CDO and Gmail with AutoHotkey, including setting the HTML body, changing the sender’s name, and sending to multiple recipients.
  • 02:03 You can use blind carbon copy and regular carbon copy in a similar format, fill out the subject line, and choose between HTML or plain text email formats.
  • 02:31 The video demonstrates how to attach a file to an email using CDO and Gmail with AutoHotkey.
  • 02:58 The speaker demonstrates how to send HTML and plain text emails using CDO and Gmail with AutoHotkey, highlighting the differences between the two formats.
  • 03:37 Attach multiple files to an email using a simple script by providing the full path of each file separated by a pipe.
  • 04:10 Automating email sending with CDO and Gmail is a convenient way to share and update files, although encryption may be necessary for added security.


hey it’s joke lines and I just want to demonstrate this script it’s mainly off of the forum there’s been some minor tweaks to it in this example I’m sending through Gmail so I went in to Gmail and looked at my settings – this is for a different server so you go in and you can go find your settings for the SMTP server for me 465 for the port worked leave these the same I’d say the sender name on some servers I’ve run into this where this is case sensitive so be careful about that depending on your
server this is where you shove in your password I have mine reading it from a variable from a any file so I don’t have to worry about showing you my password now what’s important here for Gmail is you actually have to go in and create a special app password and I’ll give you the hyperlink to it but there’s a video I found it’s a little old so it’s not quite perfect but it’s it’s easy to figure out you go into your settings and you go find any under security and I believe and say you want to create an
app password and then that will generate a second password so you don’t use your normal link Gmail password you use this other password after you create it it’s very important to the Vice it doesn’t work for Gmail I’m all the other ones I don’t have that with all my own server stuff it’s all the normal password that I use here I’m doing an example so this one and you know what yeah I will just do it here so I’m setting the HTML here I’m putting this is the body right I’m
putting in here I’m everything up between here and here we’re stuffing it into an object and it it doesn’t change let meso this is going to be per message not massage so per message so everything up above this basically once you configure it you don’t touch it unless you’re of course changing email addresses you’re sending from and whatnotbut in here I’m changing the hoots coming from this is what’s going to be displayed not the actual account right that’s what’s done up here the who
you’re sending it to if you want to send to more than one you can put in the semicolon between it’ll send to both then use you can put in a be a blind carbon copy a regular carbon copy and those would you put it in a similar format you fill out your subject line and then in here if we’re doing an HTML email if this is where I’m putting in variable right so I’m putting in the HTML here if not this would be a toggle right so I could comment that out turn this on and I would send a plain text
email right so this is how if I didn’t care about HTML which just depends what you’re doing in this example I’m gonna do the HTML one maybe I’ll do the plain text one so you can see it this next one again you wouldn’t touch any of this stuff it all stays the same and oh actually let’s see right here if you wanted to attach a file we’ll do that after we send it first but these are the lines you would uncomment out and you’d fill in the path to the file so I’m gonna run this and you’ll see let’s see
how fast it actually works so there BAM it already opened it up this is the email we sent that’s the HTML email here I could even click it right takes you to my site so it’s super fast let’s go so let’s see I sent two there I also sent it to all those will both come through in this one if we added like a carbon-copy it would do that let’s do the plain text version instead so of course so well has still works so I’m gonna save this and read lunch it come back to our inbox and here’s the next
one this is the body the plain text so see this one’s not there’s no hyperlinks there’s no anything and if they reply I think they’d have to change the format to be HTML if they want to insert a hyperlink which is annoying to me but whatever it doesn’t matter now let’s say I want to attach a file right I have two files here as a good example so you done comment these three lines and what you do is you put the path to each file the full path and then if you have more than one you delimit it with a pipe so this
one’s going to attach two files I’m going to rerun it we’re going to come back in here and here it’s already here and when we look there are the two files attached right there just text files I don’t remember what they are but they’reit’s that easy so it’s a easy script use the one just remember over there in Gmail you got to get this special password but generally speaking it’s pretty awesome to be able to you know you could you could put this into a script and have it automatically
you know send you an updated file if you even if you give it someone else of course they would have your password what you could do is encrypt it they could still figure it out but it just depends on what you’re doing right most the time if you encrypted it first and the person was in a program or it’d be pretty hard for them to not hard but they have to have some skills to get to it but it’s a convenient way to be able to automate emailing stuff so just thought I’d share that again it’s mostly
from the forum there’s not much different from it but I thought it could be helpful Cheers

Comments are closed.