vboctor / disposable_email_checker

Project that tracks the list of domains that are open domains or disposable domains with libraries in multiple languages to consume such lists.
http://www.mantishub.com
MIT License
45 stars 19 forks source link

Add DisposableEmailChecker::is_subaddressed_email() method #6

Closed TravisCarden closed 9 years ago

TravisCarden commented 9 years ago

Sub-addressed emails, sometimes called "plus addresses" or "tagged addresses", may be considered another form of disposable email. They allow a user to create variations on their email address that really all go to the same account, allowing them to bypass requirements for unique email addresses or to filter or block incoming mail based on tag. This pull request adds a method for detecting sub-addressed emails. I didn't add a call to the method to DisposableEmailChecker::is_disposable_email() because the test is less cut-and-dried than the others. It's a matter of email server configuration what character separates the username from the tag. And while the plus sign (+) is most common, there are notable exceptions. The test could be sophisticated to account for known exceptions kept in text files in the data directory. I thought this was a good first step to get your thoughts on it, @vboctor. I included unit tests and tried to match your coding conventions.

vboctor commented 9 years ago

Thanks @TravisCarden for your contribution.