Go library to verify, detect invalid, spam and junk email id.
- Identify disposable and free email providers
- The API also automatically checks for role-based emails (such as
[email protected]
or[email protected]
)
go get github.com/deepakputhraya/mailcheck
package main
import (
"fmt"
"github.com/deepakputhraya/mailcheck"
)
var emails = []string{"[email protected]", "[email protected]", "[email protected]"}
func main() {
for _, email := range emails {
// Skipped error handling
details, _ := mailcheck.GetEmailDetails(email)
fmt.Println(email)
fmt.Printf("Valid : %v; Disposable : %v; Free : %v; Role Based : %v\n",
details.IsValid,
details.IsDisposable,
details.IsFree,
details.IsRoleBased)
fmt.Println("-----")
}
}
The library can also be accessed through an API.
https://mailcheck-go.herokuapp.com/[email protected]