How do you know if an email is a company email or a person? Find out if they are using a free email provider! This Ruby class scrapes the biggest list of free email providers on the Internet and provides handy utilities to add it to your own code.
How do you tell the difference between a corporate email and a consumer email? One way is to determine if the user is using a free email provider!
The most comprehensive list of free email providers I can find on the Internet is on HubSpot’s knowledgebase of what domains they block. This repo contains a small class that simply scrapes Hubspots page and provides a few utilities so you can either use the data in your own code, or use the class and integrate it into your runtime environment. Now, you can filter the business emails out and target those customers directly.
require './free_email_sites_scraper.rb'
scraper = FreeEmailSitesScraper.new
puts scraper.emails #array of string emails
require './free_email_sites_scraper.rb'
scraper = FreeEmailSitesScraper.new
scraper.to_txt("emails.txt") #write txt file
require './free_email_sites_scraper.rb'
scraper = FreeEmailSitesScraper.new
scraper.to_ruby("email_declaration.rb") #write an array declaration for hardcoding entries