gh-mailto

module
v0.0.0-...-b6a1494 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2025 License: Apache-2.0

README

gh-mailto

logo

Discovers email addresses associated with GitHub users within an organizations. It combines multiple discovery methods to find both verified and unverified email addresses.

Limitations

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.

Installation

go install github.com/codeGROOVE-dev/gh-mailto/cmd/gh-mailto@latest
gh auth login  # GitHub CLI authentication required

Usage

The 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 organization

Filter to a specific domain and generate intelligent guesses:

gh-mailto --user username --org organization --domain example.com --guess

Normalize addresses and show detailed discovery methods:

gh-mailto --user username --org organization --normalize --verbose
Go Library
import 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"})

Discovery Methods

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

Email Guessing (optional)

The (optional) "guess" feature analyzes discovered patterns and generates intelligent guesses for the target domain using common corporate formats like firstname.lastname@domain.com and variations.

Requirements

  • Go 1.24 or later
  • GitHub CLI authenticated (gh auth login)
  • Token permissions: read:user and read:org (additional org permissions enable more methods)

License

Apache 2.0

Directories

Path Synopsis
cmd
gh-mailto command
Package main provides the gh-mailto CLI tool for discovering GitHub email addresses.
Package main provides the gh-mailto CLI tool for discovering GitHub email addresses.
server command
Package main provides a web interface for the gh-mailto tool.
Package main provides a web interface for the gh-mailto tool.
pkg
gh-mailto
Package ghmailto provides email address discovery for GitHub users.
Package ghmailto provides email address discovery for GitHub users.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL