8000 GitHub - ZliIO/zliio-disposable: This is a disposable email content verification tool package, implemented using the https://github.com/disposable/disposable-email-domains library provided by https://github.com/disposable.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ZliIO/zliio-disposable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗑📮🌍 Disposable Email Verification Tool [Java SDK]

This is a disposable email content verification tool package, implemented using the disposable-email-domains ↗ library provided by Github/Disposable ↗.

The aim is to provide a means of detecting temporary email services provided by providers such as 10MinuteMail ↗ , GuerrillaMail ↗ , and determining whether an email is a disposable email.

Why?

This tool can be used to verify whether the email address entered by users for login or registration is a temporary domain email, or to filter out existing temporary domain email addresses in the current system, for cleaning or other related processing.

Usage

<!-- ADD Maven Dependency -->
<dependency>
    <groupId>com.zliio.disposable</groupId>
    <artifactId>disposable</artifactId>
    <version>1.0</version>
</dependency>
public class DisposableTest {
    public static void main(String[] args) {
        Disposable disposable = new Disposable();

        System.out.println(disposable.validate("gmail.com"));
        // True
        System.out.println(disposable.validate("dsa@zliio.com"));
        // True
        System.out.println(disposable.validate("dsa@zliio.🤔️"));
        // False
        System.out.println(disposable.validate("test@0-mail.com"));
        // False
    }
}

You can set the black and white lists of email domains by configuring the domain-blacklist.txt and domain-whitelist.txt files under the resources directory of the project. Additionally, you can dynamically add or remove domains using methods like add* and remove* provided by the Disposable object instance.

To ensure the update of disposable-email-domains ↗, we also provide the refreshDisposableDomains() method in the Disposable object instance to obtain the latest configuration list. However, we do not recommend frequent calls to this method due to the relatively high cost and long execution time of updates. We suggest that you call this method once after creating the Disposable object instance to ensure the validity of the list.

Disposable disposable = new Disposable();
// Do refresh
disposable.refreshDisposableDomains();

When the update is successful, you will see the following message displayed in the console.

[main] INFO com.zliio.disposable.DomainsLibraryManager - DomainsLibraryManager :: Added : 54 Domain(s)
[main] INFO com.zliio.disposable.DomainsLibraryManager - DomainsLibraryManager :: Removed : 75 Domain(s)

For convenience, we provide separate solutions to validate email format, validate domain names, and validate disposable email addresses.

Generic lists with all domains

Hosts with validated DNS (a valid MX / A record):

List of SHA1

About

This is a disposable email content verification tool package, implemented using the https://github.com/disposable/disposable-email-domains library provided by https://github.com/disposable.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0