7 Replies - 17380 Views - Last Post: 25 November 2005 - 11:52 AM

#1 nbartow  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 3
  • Joined: 16-June 05

Verify Email address

Posted 16 June 2005 - 08:09 AM

Is there a function you can put into your web site to verify the email address that some one enters? HTML, Visual Basic, C#, Other

Thanks,
Neil
Is This A Good Question/Topic? 0
  • +

Replies To: Verify Email address

#2 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1877
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: Verify Email address

Posted 16 June 2005 - 08:28 AM

If you only want to check whether the email address was entered with an @ and atleast 1 dot, then you can use javascript, here is an example:

http://www.smartwebb..._validation.asp
Was This Post Helpful? 0
  • +
  • -

#3 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Verify Email address

Posted 16 June 2005 - 09:17 AM

Regular expressions are another good way...here are a couple of good examples of email validation.

function validateEmail(form) 
{
   //Validating the email field
    var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
    if (! form.Email.value.match(re)) {
        alert("Invalid email address");
        form.Email.focus();
        form.Email.select();
        return (false);
    }
    return(true);
}



and
function checkemail(str)
{
  var filter=/^.+@.+\..{2,3}$/
  return (filter.test(str))
}


Here is a good article that walks through regular expressions. these examples are in javascript (perfect for your web page), but regular expressions are available in almost all programming languages, and are a very powerful tool that should be used where warranted.
Was This Post Helpful? 0
  • +
  • -

#4 nbartow  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 3
  • Joined: 16-June 05

Re: Verify Email address

Posted 17 June 2005 - 05:10 AM

No. I would like to actually verify that the email address exists.

Any thoughts?

Thanks, Neil
Was This Post Helpful? 0
  • +
  • -

#5 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Verify Email address

Posted 17 June 2005 - 07:16 AM

There are millions and millions of email addresses, and no central reporsitory for them all. The only way to can verify if one exists is to send an email to it, and see whether or not you get a return of that send. If you wish, you could write a small application that runs after an email is sent, and checks the inbox of the mail server from which you sent them email, to see of there is a bounce. You'd likely have to parse the subject line to distinguish it from others.

Using PHP, you can at least check if the domain is real with the checkdnsrr() function, there mat be similar functions in other languages. This function, however, does suffer from some fairly serious holes and limits.
Was This Post Helpful? 0
  • +
  • -

#6 lapaille  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 21-November 05

Re: Verify Email address

Post icon  Posted 21 November 2005 - 10:37 AM

There is an online tool that verify email address. I think it uses PHP. I like it because it verifies that the username and the mailbox are valid and really exist by connecting to the server, pretty neat. ;)
Was This Post Helpful? 0
  • +
  • -

#7 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Verify Email address

Posted 21 November 2005 - 10:47 AM

I believe the user may be looking for w ay he can validate the address from within one of his own web pages or applications.
Was This Post Helpful? 0
  • +
  • -

#8 dbfootballa3  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 238
  • Joined: 24-November 05

Re: Verify Email address

Posted 25 November 2005 - 11:52 AM

Uhh My friend made one a while back, maybe this could help. I don't think it is the same as Amadeus, but if it is, O well :P

 $email = " The Email Address"
 
 if (eregi("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $email))  
 {
    echo "Please fix your email";
 } else {
 
    echo "Thank you";
 
 }  



I hoped that helped ya!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1