Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comments
Comment #1
daviddoyle CreditAttribution: daviddoyle commentedSubscribing.
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
Comment #2
DrewMathers CreditAttribution: DrewMathers commented@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".
Comment #3
Liam MorlandWebform 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.
Comment #4
svendecabooter@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.
Comment #5
Liam MorlandComment #6
DrewMathers CreditAttribution: DrewMathers commentedI 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.
Comment #7
DrewMathers CreditAttribution: DrewMathers commentedMy 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.
Comment #8
DrewMathers CreditAttribution: DrewMathers commentedHere 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.
Comment #9
Liam MorlandI 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.
Comment #10
Liam MorlandPatch as applied. Note that this was done in two commits.
Comment #11
Liam MorlandComment #12
DrewMathers CreditAttribution: DrewMathers commentedLiam,
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.
Comment #13
DrewMathers CreditAttribution: DrewMathers commentedD6 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.
Comment #14
idebr CreditAttribution: idebr commentedThe name value needs to be returned by the t() function, so it can be translated
Comment #15
parameshrag CreditAttribution: parameshrag commentedI 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?
Comment #16
Liam Morland@parameshrag Please open a separate ticket about this.
Comment #17
parameshrag CreditAttribution: parameshrag commentedHello 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
Comment #18
Liam MorlandLinks to a ticket should be done like this [#<number>]. That will make it appear like this: #2623346: Webform Email Validation (restriction/blacklist).
Comment #19
Liam MorlandDrupal 6 is no longer supported. If this issue exists in a later version of webform_validation, please re-open and update the version number.
Comment #20
Liam Morland