@check_for_mail

This project is not covered by Drupal’s security advisory policy.

The purpose of this module is to 'pre-check' that an email domain is valid using the mail exchange records (MXR). The primary use case is email entry typos such as @homtail.com, which will cost extra resources on manual follow up or lost visitors due to negative experience.

Once this module is installed and enabled it can be utilized by site admins and developers in a few ways:

  • Managing email type fields for content types (A checkbox will be available on the create and edit content type forms)
  • Editing/creating email type components using the webform module (A checkbox will be visible in the validation section
  • Developers - In code using the form API '#element_validate' control


Use Case

A user signing up for an e-mail newsletter subscription. A form is built for a user to enter their email address so that they can receive the newsletter from your site. Their actual email address is average_human@homtail.com, but they make a typo when entering this information: average_human@homtail.com. Normally this will not generate an error (which it should as homtail.com is not a valid email domain), and the user will never receive their much anticipated newsletter. This will require extra resources to manually address the situation if the user complains - or worse the user (and potential customer) never returns due to a negative experience.

Feature Notes

Upon validation failure in the above example, this module will show the user an error and require that their email be entered correctly. A list of allowed domains can be manually configured that will bypass the validation check. Domains that pass validation are stored in a cache bin of allowed domains to save processing overhead. The error message can be configured and supports multilingual variables. Optionally, an entity can be generated for every failed validation and, if enabled, a view (with a configurable path) will become available for a table of these entities.

At its core Email Verify is similar to this project. There are primarily two differences.
The validation functionality in Email Verify is more thorough.
This module aims for a more extensive integration with the rest of Drupal. Out of the box Email Domain Valiadate is able to view failed validations in a report, and add its validation check to: content types, webform components, and using the form API.

Limitations

Some email addresses that are common typos will pass this validation check, such as: @hotmali.com, @google.ca, or @googl.com. This module does not currently check the local part of the email address (average_human@hotmail.com).

Requirements

Supporting organizations: 

Project information

Releases