Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to check if e-mail address exists? 4

Status
Not open for further replies.

EugenePaliev

Programmer
Jul 18, 2001
537
UA
Hello all!

I want to check if e-mail address exists when new user is registering. I saw it couple of times on other sites - I entered non-existent address and got the error on it. And now I want to use it on my site. Do you know any services that can be helpful for this idea?

Thanks in advance!
Eugene Good Luck! :)
 
I believe this has to do with a mail-bot sending out a request to the e-mail address. If it recives a live response, then it validates the address as good. I think this requires some extensive server side applications, so unless you have access to the server, this might not be possible.

You can still apply the standard checks on address, like does it contain the @ symbol, or limit it to a max character count (who has an email address in excess of 50 chars?) "The surest sign that intelligent life exists elsewhere in the universe is that it has never tried to contact us"
Bill Watterson, Calvin & Hobbes
 
Are you sure you've seen it before. I doubt you could, otherwise some spammer would have created a program and we'll all be with overtaken junk mail.
 
Do I detect a hint of sarcasm there bearsite4?

This e-mail checker was grabbed from java-scripts.net. Checks to see that only valid characters have been submitted:
Code:
<script language=&quot;JavaScript1.2&quot;>
/*
Advanced Email Check
By Website Abstraction ([URL unfurl="true"]http://www.wsabstract.com)[/URL] and
Java-Scripts.net ([URL unfurl="true"]http://www.java-scripts.net)[/URL]
Over 200+ free scripts here!
*/

var testresults

function checkemail(){
 var str=document.validation.emailcheck.value
 var filter=/^.+@.+\..{2,3}$/

 if (filter.test(str))
    testresults=true
 else {
    alert(&quot;Please input a valid email address!&quot;)
    testresults=false
}
 return (testresults)
}
</script>



<script>
function checkbae(){
if (document.layers||document.all)
return checkemail()
else
return true
}
</script>



<form name=&quot;validation&quot; onSubmit=&quot;return checkbae()&quot;>
Please input a valid email address:<br>
<input type=&quot;text&quot; size=18 name=&quot;emailcheck&quot;>
<input type=&quot;submit&quot; value=&quot;Submit&quot;>
</form>
&quot;The surest sign that intelligent life exists elsewhere in the universe is that it has never tried to contact us&quot;
Bill Watterson, Calvin & Hobbes
 
Hi,

I'm not being sarcastic and really I'm not accusing anyone of lying :) Maybe I didn't choose the right words though.
I intended no offence of course.
 
Write your own component is the only solution.

1. Try to do the dns lookup to check the mail server of an email.

For example:
asd@yahoo.com
perform dns lookup for yahoo.com ( select mail exchange ).
Results: Yahoo.com has 3 MX
mx1.mail.yahoo.com
mx2.mail.yahoo.com
mx4.mail.yahoo.com

2. Telnet (use tcpClient object to setup telnet session) to
each and every one of the above smtp server ( mail exchange server ) [starts with the lowest number]
smtp Port: 25,
follow smtp RCF as below

Example:
>: client request >>: server response
telnet mx1.mail.yahoo.com 25
> HELO yourdomain.com
>> response from smtp server 1 <<= check if it's ok
> Mail From: youremail@yourdomain.com
>> response from smtp server 2 <<= check if it's ok
> RCPT To: asd@yahoo.com
>> response from smtp server 3 <<= check if it's ok
> Quit
>> Good bye

if response 3 is ok then asd@yahoo.com is valid.

Hope this help.


 
Hello LawsonLaw!

Thank you for response! Honestly not everything is clear for me now but I'll try to figure it out. Thanks any way!

I wanted to give you a star, but there is no link for it under your post :(( Probably because you are not a member, but a visitor only... Good Luck! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top