A small and handy Golang utility to check whether email address is disposable email.
Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
generator
.gitignore
README.md
domain_list.go
emailcheck.go
emailcheck_test.go

README.md

EMAILCHECK

A small and handy Golang utility to check whether email address is disposable email.

DETAILS

Disposable email domain list is ported from FGRibreau/mailchecker, with duplication removal and transform all domain name to lowercase.

INSTALL

go get -u -v github.com/simukti/emailcheck

UPDATE DOMAINS

To update domain list, just simply run :

cd $GOPATH/src/github.com/simukti/emailcheck

cd ./generator && go run main.go && cd ../ && go fmt .

TEST

$ go test -v ./...

HOW TO USE

package main

import (
    "github.com/simukti/emailcheck"
)

func main() {
    emailAddress := "kadalkesit@mailinator.com"
    
    // validate email format here :
    // ....
    
    if isDisposable := emailcheck.IsDisposableEmail(emailAddress); isDisposable {
        // detected as disposable email
        // do something here    
    }
}

LICENSE

This project is released under the MIT licence.