New module: Email Validator

Today I published on drupal.org the module I was developing the last few days: Email Validator. I copy from there the description of the module:
Integrates Drupal with the Email Address Online Verification API. As it is said in the service's website, the validation process includes the following steps:
  • Syntax verification
  • DNS validation including MX record lookup
  • Disposable email address (DEA) detection
  • SMTP connection and availability checking
  • Temporary unavailability detection
  • Mailbox existence checking
  • Catch-All testing
  • Greylisting detection
In case the service is unavailable at the moment, this module may use Drupal's built-in valid_email_address() function, assume a valid email address or assume an invalid email address. The administrator of the website may change the action to use, using the configuration form of this module.

It was a nice challenge for me since it was the first time I played around with the Field API to make sure this module played well with the Email field widget. It was a fascinating procedure and is was awkward to find out that there was no hook_field_settings_form_alter() or equivalent to target the settings form of a specific field or field type. I had to use the common hook_form_FORM_ID_alter() (actually it's hook_form_field_ui_field_edit_form_alter() since the form is produced by the field_ui core module) and check the widget type from $form_state['build_info']['args'][0]['widget']['type'].

I also sent a message to Email Validator service in case they could provide an API call for getting the credits the account has before making a verification call. I think it would be a nice addition.

For any issues or feature request, please prefer the issue queue ;)

Comments

Popular Posts