Discovers email addresses associated with GitHub users within an organizations. It combines multiple discovery methods to find both verified and unverified email addresses.
GitHub only returns verified email addresses within Enterprise organizations when you have appropriate permissions. This tool uses that verified data when available and supplements it with additional discovery methods when needed.
This library isn't really going to help you spam users, sorry.
go install github.com/codeGROOVE-dev/gh-mailto/cmd/gh-mailto@latest
gh auth login # GitHub CLI authentication requiredThe easiest way is the web UI: https://mailto.codegroove.dev/
There is also a CLI tool:
Find all email addresses for a user in an organization:
gh-mailto --user username --org organizationFilter to a specific domain and generate intelligent guesses:
gh-mailto --user username --org organization --domain example.com --guessNormalize addresses and show detailed discovery methods:
gh-mailto --user username --org organization --normalize --verboseimport ghmailto "github.com/codeGROOVE-dev/gh-mailto/pkg/gh-mailto"
lookup := ghmailto.New(githubToken)
result, err := lookup.Lookup(ctx, "username", "organization")
for _, addr := range result.Addresses {
fmt.Printf("%s (verified: %t, methods: %v)\n",
addr.Email, addr.Verified, addr.Methods)
}
// optionally generate domain-specific guesses
guesses, err := lookup.Guess(ctx, "username", "organization",
ghmailto.GuessOptions{Domain: "example.com"})The tool runs multiple discovery methods in parallel, prioritizing verified sources over unverified ones:
Verified: SAML identity providers (Enterprise), organization verified domain emails Unverified: Public profiles, git commit history, organization member API data
The (optional) "guess" feature analyzes discovered patterns and generates intelligent guesses for the target domain using common corporate formats like [email protected] and variations.
- Go 1.24 or later
- GitHub CLI authenticated (
gh auth login) - Token permissions:
read:userandread:org(additional org permissions enable more methods)
Apache 2.0
