admin管理员组文章数量:1420197
how do i validate Existing E-Mail Address.
in a Registration system, when a user enter a Email address it checks if the Email address is existing or not in Ymail/Gmail.
i already have a running domain(for Practice).
You have my regards.
how do i validate Existing E-Mail Address.
in a Registration system, when a user enter a Email address it checks if the Email address is existing or not in Ymail/Gmail.
i already have a running domain(for Practice).
You have my regards.
Share Improve this question asked Feb 12, 2012 at 5:29 Christian Eric ParanChristian Eric Paran 1,0106 gold badges28 silver badges49 bronze badges 2- Are you asking how to test whether an address entered by a user belongs to that user, or whether it exists at all? (And why Ymail/Gmail specifically?) – nnnnnn Commented Feb 12, 2012 at 5:39
- if the Emaill Address exist or not. i want to know how to check if the email address is existing or not. – Christian Eric Paran Commented Feb 12, 2012 at 7:08
4 Answers
Reset to default 4Most registration systems validate an email address by sending an email to it with a uniquely encoded URL in it and requiring the user to go get that email and click on the link. When your server sees that the link has been clicked on the email address is know to be accessed by you.
Here's a basic flowchart for how it works:
- User goes to your website
- User mences registration and fills in their email address
- Server checks to see if email address is in a legal and proper form and is not already registered
- If the rest of the user's registration looks good and then email address looks legal, the server creates an account in your system and puts in the "unverified" state.
- Then, a code is generated that corresponds to that specific user. That code is put onto an URL and that URL is put into an email which is sent to the email address the user entered.
- The user receives the email with instructions to click on the enclosed link.
- User retrieves email and clicks on the link.
- Your server receives web request from that link. It parses out the code from the URL and checks to see if that code matches an account that is in the "unverified" state. If so, and the account has not expired from too much time elapsing since the email was sent, then the account is put into the "verified" state and is ready for use.
The basic idea of this system is that if you can retrieve an email sent to that email address then the email address must be a valid and working email address and you, the user, must be able to access that email address (it's not just some random email address you made up).
Back in the day, you could easily validate email addresses. Then the spammers came along. Now the only way you can confirm the existence of an email address is by trying to send something to it and checking for bounces. And even then, the lack of a bounce doesn't mean it exists - it could simply have been silently deleted, ignored, spam filtered into oblivion, etc...
Basically, what you want is not possible - any such system would simply help spammers hammer your box with more russian brides popping penis pills while wearing fake rolexes.
SMTP provides VRFY and EXPN verbs to check if an account or mailing list exists. However, most server admins disable these verbs from their mail configuration to prevent hackers from exploiting user lists. Gmail and Yahoo are said to have VRFY disabled.
Another option you can try for these servers is emailing the user with a link to confirm their email address. Granted, it is not as sexy as realtime email verification, but it is more secure for all parties.
It is practically not possible to validate email address with growing number of spams.
These days people send a mail to the email address entered by user to plete the registration or activate the account. You can probably do that and is a much safer way to do. You can find a number of resources online to implement this functionality.
本文标签:
版权声明:本文标题:php - How to validate if the E-Mail Address is existing in YMail,Gmail,etc.? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745326047a2653596.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论