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.
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 thedata
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.