Here is a plugin that integrates the Email Verify module into Webform Validation. Email Verify checks that an email address actually exists. I suggest placing it in /sites/all/modules/webform_validation/contrib

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

daviddoyle’s picture

Subscribing.

The default webform module's built in validation for an email field does not allow for the + symbol in the email address. The use of the plus symbol in the email address will start to increase, as gmail provides extra functionality for users using the plus symbol (i.e. drupal+new@gmail.com will folder any emails sent to that address in drupal@gmail.com's 'new' folder)

Does this validation allow for the plus symbol? Or does it purely provide the process of checking the existence, and if so, does it return true for emails with the plus symbol in it?

Cheers,
Dave

DrewMathers’s picture

@daviddoyle,

Good to know about Gmail and the + symbol. Even if Drupal core email validation doesn't reject the + symbol, the Email Verify module will fail on it because its algorithm is testing for the existence of a mailbox called "drupal+new", to use your example. This new feature would have to be accommodated in Email Verify. This sounds non-standard. What if Yahoo or Hotmail use different symbols?

There is an explanation of the different kinds of email validation in the README.txt attached above, under the heading "Similar Modules".

Liam Morland’s picture

Webform now allows the + symbol in its email component. I don't think the + will cause a problem with Email Verify. As I understand it, it check that email to the address is accepted, which is it. The + is only special because Google internally uses it to direct email.

svendecabooter’s picture

Status: Needs review » Needs work

@DrewMathers: thanks for your contribution, and sorry for my very late reply.

Is this still relevant, based on Liam Morlands feedback?
If yes, could you please supply your changes in a patch format, rather than attaching the whole module?
That makes our workflow a lot easier.

Liam Morland’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
DrewMathers’s picture

I have prepared the module as a patch. It works correctly in Webform Validation 6x-1.5, but in the current dev snapshot it fails to trap invalid emails.

Drupal.org says the patch file is too big to attach. It is 20.2 kb. I will send it privately if you like.

DrewMathers’s picture

Status: Needs work » Needs review
FileSize
20.29 KB

My mistake. I un-installed and re-installed Webform Validation, but forgot to re-define validation rules.

This integration tested okay with the current dev release of Webform Validation.

Please read the README.txt of my module as you will need to patch the Email Verify module if you are using shared hosting.

DrewMathers’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
FileSize
19.96 KB

Here is the D7 version Email Verify sub-module.

The shared hosting problems from D6 have been fixed in the D7 version (currently a dev snapshot) of Email Verify.

Liam Morland’s picture

Status: Needs review » Fixed

I have made a fix in the core of Webform Validation, rather than making a new module. It checks if the Email Verification is enabled and exposes that validation rule if it is. Fixed in caf6d37.

Liam Morland’s picture

Patch as applied. Note that this was done in two commits.

Liam Morland’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)
DrewMathers’s picture

Liam,

The D6 version of Email Verify is less stable than the D7 version. You need to follow the instructions under Known Problems in my Readme.txt (see initial post) to get it working. A separate sub-module might be the way to go here. D6 patch is in comment #7.

DrewMathers’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.56 KB

D6 backport patch

To run D6 Email Verify in shared hosting, you must use that -dev snapshot and apply these patches to it:
#508004-20: Email Verify requires the server of a version of PHP 5.3 on Windows?
#431376-6: Running with shared hosting security

Note: even Unix hosts require both above patches.

idebr’s picture

Issue summary: View changes
Status: Needs review » Needs work

The name value needs to be returned by the t() function, so it can be translated

parameshrag’s picture

I am using webform in drupal to capture users email address, but I want to restrict the user to enter free emails like gmail, yahoo, rediffmail etc. only corporate email should accepted. Can anybody please let me know how to do that?

Liam Morland’s picture

@parameshrag Please open a separate ticket about this.

parameshrag’s picture

Hello Liam,

Thank you for instructions.

I have opened a new ticker for my issue

here is it https://www.drupal.org/node/2623346

Thanks,
Pramesh

Liam Morland’s picture

Links to a ticket should be done like this [#<number>]. That will make it appear like this: #2623346: Webform Email Validation (restriction/blacklist).

Liam Morland’s picture

Status: Needs work » Closed (won't fix)

Drupal 6 is no longer supported. If this issue exists in a later version of webform_validation, please re-open and update the version number.

Liam Morland’s picture

Status: Closed (won't fix) » Closed (outdated)