cancel
Showing results for 
Search instead for 
Did you mean: 

Email Verification Extension

Email Verification Extension

Hi i am hoping to develop a Magento extension which can check the top level domain (.co.uk, .gov, .mil) and also verify the email address is valid by sending the user an email with a link or code.

 

Any advice or a point in the right direction is much appreciated!

4 REPLIES

Re: Email Verification Extension

Check below may be help you & email verification with link is default magento functionality

 

– Go to System -> Configuration -> CUSTOMERS -> Customer Configuration
– Click Create New Account Options
– Set Require Emails Confirmation = Yes
– Save Config

Domain validation code:-

$email = 'the_username_here@yahoo.com';
$domain = substr(strrchr($email, "@"), 1);
$domain_list = array("(co.uk", "gov", "yahoo.com","mil");
if (in_array($domain, $domain_list)) {
echo "This is correct domain";
}

Re: Email Verification Extension

Just to follow Magikvishal's advice - I'd look at using PHP's filter_var() function for this:

 

if (!filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
    echo ("$email is a valid email address");
} else {
    echo("$email is not a valid email address");
}

Re: Email Verification Extension

Thank you for that i have tried the following:

 

$domain = substr(strrchr($_POST['email'], "@"), 1);
$domain_list = array(".co.uk", "org.uk");

if (in_array($domain, $domain_list) === false) {
            echo "This email address does not qualify";
        }


If i enter test@.co.uk it works but i need to be able to enter test@anything.co.uk

Re: Email Verification Extension

@Magikvishal is right so please follow the #Magikvishal's method
and thank you

Want Magento Professionals ?
& Get FREE 3 hour development today with ClapCreative - Building a Better User interface with http://clapcreative.com