RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Enterprise
Expertise: Beginner
Apr 19, 2007

Using Hotstrings in AutoHotKey to Perform Group Emails

Lots of people use online email like Gmail nowadays, but one functionality these types of email hosts lack is the ability to refer to a group of contacts and have every email in that group receive the mail.

If you want to send the same email to twenty people or 100, you need to write their addresses (or copy them and paste them) each time.

You can automate this using AutoHotkey, the scripting language described in this recent DevX article, by using the HotStrings functionality of the language.

First, download AutoHotKey, install it, and write a script called emailgroups.ahk in NotePad or another text editor.

In the script, write your groups like this:

::emailgroup1:: me@gmail.com, someone@google.com, tester@yahoo.com, 

And so forth. Use whatever separator your online email service uses to separate addresses from each other. For example, Gmail uses a comma, as in the example above, but others might use a semicolon.

Likewise, you would email multiple groups by defining more hotstrings:

::emailgroup1:: the string of email addresses you want to replace your hotstring with

::emailgroup2:: the string of email addresses that belong to this group. 
To use this, place your cursor in the To: field of your online email form and then write the name of the group of email addresses you want placed in the field. AutoHotKey will write the addresses for you.

Bryan Rasmussen
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date