GitHub

Short for disposable email providers list, is a Go package for checking email addresses against a list of disposable email provider domains.

Usage

Download and install the package:

go get github.com/codehill/depl

Check a domain name and an email address:

package main

import (
	"fmt"
	"log"

	"github.com/amgedr/depl"
)

func main() {
	check, err := depl.IsDomainDisposable("example.com")
	if err != nil {
		log.Fatal(err)
	}

	if check {
		fmt.Println("Domain name is in depl list")
	} else {
		fmt.Println("Domain name is not in depl")
	}

	check, err = depl.IsEmailDisposable("example@example.com")
	if err != nil {
		log.Fatal(err)
	}

	if check {
		fmt.Println("Domain name is in depl list")
	} else {
		fmt.Println("Domain name is not in depl")
	}
}

Contributing

  • If you've got any suggestions or questions, please create an issue here.
  • If you want to contribute to the list, fix a bug or implement a feature, please feel free to do so. Just send me a pull request.

License

This project is licensed under a MIT license.