DEV Community

Cover image for Why and how I built an Email Permutator
Andreas
Andreas

Posted on

Why and how I built an Email Permutator

Sometimes it takes a while to automate the trivial tasks … 10 years back, I started working as a marketer in the B2B software niche. I was confronted with email marketing, contact & and newsletter messaging from day one. The fact that I have an academic background in mechanical engineering and hence automation and programmatic approaches have always been a strong part of the way I work, make me question even more why it has taken me 10 years to automate something that I have solved manually over and over again: email permutation.

What is email permutation?

Email permutation is the variation of a person’s first- and lastname, combined with a TLD in order to find their email address. The basic assumption is that business email addresses follow commonly used syntax patterns, like the following:

johnsmith@example.com
john.smith@example.com
jsmith@example.com
j.smith@example.com
johns@example.com
john.s@example.com
js@example.com
j.s@example.com
smithjohn@example.com
smith.john@example.com
smithj@example.com
smith.j@example.com
sjohn@example.com
s.john@example.com
sj@example.com
s.j@example.com
john-smith@example.com
j-smith@example.com
john-s@example.com
j-s@example.com
smith-john@example.com
smith-j@example.com
s-john@example.com
s-j@example.com
john_smith@example.com
j_smith@example.com
john_s@example.com
j_s@example.com
smith_john@example.com
smith_j@example.com
s_john@example.com
s_j@example.com
Enter fullscreen mode Exit fullscreen mode

converting john smith and example.com into variables makes the list look like this:

${firstname}@${domain}
${firstname}${lastname}@${domain}
${firstname}.${lastname}@${domain}
${firstLetterFirstname}${lastname}@${domain}
${firstLetterFirstname}.${lastname}@${domain}
${firstname}${firstLetterLastname}@${domain}
${firstname}.${firstLetterLastname}@${domain}
${firstLetterFirstname}${firstLetterLastname}@${domain}
${firstLetterFirstname}.${firstLetterLastname}@${domain}
${lastname}${firstname}@${domain}
${lastname}.${firstname}@${domain}
${lastname}${firstLetterFirstname}@${domain}
${lastname}.${firstLetterFirstname}@${domain}
${firstLetterLastname}${firstname}@${domain}
${firstLetterLastname}.${firstname}@${domain}
${firstLetterLastname}${firstLetterFirstname}@${domain}
${firstLetterLastname}.${firstLetterFirstname}@${domain}
${firstname}-${lastname}@${domain}
${firstLetterFirstname}-${lastname}@${domain}
${firstname}-${firstLetterLastname}@${domain}
${firstLetterFirstname}-${firstLetterLastname}@${domain}
${lastname}-${firstname}@${domain}
${lastname}-${firstLetterFirstname}@${domain}
${firstLetterLastname}-${firstname}@${domain}
${firstLetterLastname}-${firstLetterFirstname}@${domain}
${firstname}_${lastname}@${domain}
${firstLetterFirstname}_${lastname}@${domain}
${firstname}_${firstLetterLastname}@${domain}
${firstLetterFirstname}_${firstLetterLastname}@${domain}
${lastname}_${firstname}@${domain}
${lastname}_${firstLetterFirstname}@${domain}
${firstLetterLastname}_${firstname}@${domain}
${firstLetterLastname}_${firstLetterFirstname}@${domain}
Enter fullscreen mode Exit fullscreen mode

Since my business also provides an email validation service (emailvalidation.io), I have published the email permutator on the website of our service.

What can be done with the retrieved list

The nature of the list above implies that max one email address of the list is actually valid. Sending emails to all addresses from the list will drastically destroy your reputation and will drive future email campaigns to the spam folder of your recipients.

Hence, the real magic starts you put the retrieved list of email addresses into an email validation service as a second step. This may provide you with a list of valid email addresses of contacts that is valid and can be targeted with your next email campaign. Of course you should always keep in mind to get people’s consent before adding them to your email campaign.

Top comments (0)