Home

Awesome

<p align="right"> ⭐ &nbsp;&nbsp;<strong>the project to show your appreciation.</strong> :arrow_upper_right: </p> <p align="right"> <a href="https://pkg.go.dev/github.com/rocketlaunchr/anti-disposable-email"><img src="http://godoc.org/github.com/rocketlaunchr/anti-disposable-email?status.svg" /></a> <a href="https://goreportcard.com/report/github.com/rocketlaunchr/anti-disposable-email"><img src="https://goreportcard.com/badge/github.com/rocketlaunchr/anti-disposable-email" /></a> <a href="https://gocover.io/github.com/rocketlaunchr/anti-disposable-email"><img src="http://gocover.io/_badge/github.com/rocketlaunchr/anti-disposable-email" /></a> </p> <p align="center"> <img src="https://github.com/rocketlaunchr/anti-disposable-email/raw/master/logo.png" alt="anti-disposable-email" /> </p>

Anti Disposable Email Address Checker for Go

If you want to detect if new account registrations are using disposable email services, then this is your package.

Ultimately this is a business decision.

Installation

go get -u github.com/rocketlaunchr/anti-disposable-email
import "github.com/rocketlaunchr/anti-disposable-email"

Usage

import "github.com/rocketlaunchr/anti-disposable-email"

ParsedEmail, _ := disposable.ParseEmail("rocketlaunchr.cloud@gmail.com")

Output

(disposable.ParsedEmail) {
 Email: (string) (len=21) "rocketlaunchr.cloud@gmail.com",
 Preferred: (string) (len=9) "rocketlaunchr.cloud",
 Normalized: (string) (len=9) "rocketlaunchrcloud",
 Extra: (string) "",
 Disposable: (bool) false,
 Domain: (string) (len=11) "gmail.com",
 LocalPart: (string) (len=9) "rocketlaunchr.cloud"
}

If Disposable is true, then the email address is from a disposable email service.

Normalized

If you want to block duplicate email addresses from your database, then store as a unique-key the Normalized data. See docs.

Update

This package can auto-update the disposable domain list. It uses the regularly updated list from disposable-email-domains.

import "github.com/rocketlaunchr/anti-disposable-email"
import "github.com/rocketlaunchr/anti-disposable-email/update"

update.Update(ctx, &disposable.DisposableList)

Other useful packages

Legal Information

The license is a modified MIT license. Refer to LICENSE file for more details.

© 2020-22 PJ Engineering and Business Solutions Pty. Ltd.