A small and handy Golang utility to check whether email address is disposable email.
Disposable email domain list is ported from FGRibreau/mailchecker, with duplication removal and transform all domain name to lowercase.
go get -u -v github.com/simukti/emailcheck
To update domain list, just simply run :
cd $GOPATH/src/github.com/simukti/emailcheck
cd ./generator && go run main.go && cd ../ && go fmt .
$ go test -v ./...
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
}
}
This project is released under the MIT licence.