A Ruby Gem to find someone's possible email address using their first name, last name, and domain.
NOTE: Rapportive recently changed their API which has broken the functionality of this gem. If you already know where the bug is or have time to fix it, send a pull request.
More information in my blog post at PatrickPerey.com
Install the gem:
$ gem install possible_email
Enter target's first name, last name, and possible domain name into the terminal using search
$ possible_email search first_name last_name domain
Not sure about the domain name? Just add multiple domains at the end
$ possible_email search first_name last_name gmail.com yahoo.com live.com
Just want to Confirm a single email address? Use find_profile
$ possible_email find_profile [email protected]
Multiple email address? Same find_profile
$ possible_email find_profile [email protected] [email protected]
require 'possible_email'
profiles = PossibleEmail.search('Kevin', 'Rose', 'gmail.com')
profiles #=> "#<PossibleEmail::Response>"
first_profile = profiles.first
first_profile.name #=> 'Kevin Rose'
first_profile.email #=> '[email protected]'
first_profile.location #=> 'San Francisco Bay Area'
Available methods:
*search(first_name, last_name, domain)
Accepts three arguments first_name
, last_name
, and domain
. PossibleEmail will use these three arguments to generate possible email addresses based on common email address patterns. PossibleEmail would then attempt to verify and return an email profile for each email address.
# Single domain name
PossibleEmail.search('bob', 'jones', 'gmail.com')
# Multiple domain names as Strings
PossibleEmail.search('bob', 'jones', 'gmail.com', 'yahoo.com')
# Multiple domain names as an Array
domains = ['gmail.com', 'yahoo.com', 'live.com']
PossibleEmail.search('bob', 'jones', domains)
*find_profile(emails)
Accepts a list of email address string arguments or an array. Instead of generating email addresses based on name arguments, PossibleEmail would attempt to verify and return an email profile for each email addresses passed into the method.
# Comma-splitted email arguments
PossibleEmail.find_profile('[email protected]', '[email protected]')
# Array of emails
PossibleEmail.find_profile(['[email protected]', '[email protected]'])
Both methods return a PossibleEmail::Response
object. PossibleEmail::Response
includes the Enumerable
module, so all the methods you need to iterate through the profiles are available. The only exception when neither the search
or find_profile
is when there is only one profile within the response. In this case, the method returns the single Profile.
Class for the associated data connnected with a specific email address.
Profile
attribute list:
email
- Returns the profile's email addressname
- Full namefirst_name
- First namelast_name
- Last namefriendly_name
- First name or named used to address this personlocation
- Locationheadline
- Short blurb about personsuccess
- Type of response returned back from Rapportive APIoccupations
- Array of Occupation objectsmemberships
- Array of social network Membership objectsimages
- Array of Image objects
Class for person's jobs.
Occupation
attribute list:
job_title
- Job titlecompany
- Company
Class for Social Network Accounts
Membership
attribute list:
profile_url
- URL to person's website membershipprofile_id
- Website profile IDusername
- Usernamesite_name
- Name of the website membership
Class for images associated with email profile.
Image
attribute list:
url
- Image urlservice
- Where the image is locatedurl_proxied
- Rapportive image proxied URL
- With great power, comes great responsibly
- Wrapper around the undocumented Rapportive API.
- Valid results may be hidden due to API's limitations
- Overuse may result in API throttling
- Send Bitcoin
18fZ6muNmBrtENMZhnAjUw8eEsytmY8mZJ
- Fork it ( http://github.com/the4dpatrick/possible-email )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request