/anti-disposable-email

Block disposable emails in Go

Primary LanguageGoMIT LicenseMIT

⭐   the project to show your appreciation. ↗️

anti-disposable-email

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

  • awesome-svelte - Resources for killing react
  • dataframe-go - Statistics and data manipulation
  • dbq - Zero boilerplate database operations for Go
  • electron-alert - SweetAlert2 for Electron Applications
  • google-search - Scrape google search results
  • igo - A Go transpiler with cool new syntax such as fordefer (defer for for-loops)
  • mysql-go - Properly cancel slow MySQL queries
  • react - Build front end applications using Go
  • remember-go - Cache slow database queries
  • showerglass - A soothing face filter for social applications.
  • testing-go - Testing framework for unit testing

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.