473,503 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

email verification

18 New Member
Hi..

I want a php function that validates emails for me. how can I do that?
I don't want to send the email neither use activation link. I want something like:
<Links removed>

I tried to search on the internet but nothing is found useful.

Many thanks in advance.

Regards,
HK
Aug 22 '08 #1
8 1647
dlite922
1,584 Recognized Expert Top Contributor
why do you need this? for your application? or are you trying to build this to provide this verification service for users?
Aug 22 '08 #2
hmkaddoura
18 New Member
it is used for my application..I want to send more than 40000 emails but many of them are not valid.
Aug 23 '08 #3
Atli
5,058 Recognized Expert Expert
Hi.

There is no reliable way of "verifying" that an email exists.
It is possible to "ask" a mail server if the email exists, but you have no guarantee that the server will respond accurately. Many of them will attempt to mask the existence of their users, giving false negatives even for valid emails, or give false positives for all queries.

For example, the links you posted earlier gave a false positive for an email I know doesn't exist.

The one thing you can do, really, is verify that the email *address* is valid and either blindly accept the address, or resort to sending verification emails.
Aug 25 '08 #4
hmkaddoura
18 New Member
Hi..
but there are many web services did this validation and it worked even for hotmail and yahoo.

i.e.
<link removed>

most of my users are from a domain that give true positive reply..and very few are hotmail, gmail and yahoo users. thats why i want to minimize the number of sent emails or i will not give high priority for sending.
Aug 25 '08 #5
Atli
5,058 Recognized Expert Expert
After taking a closer look at those links, I've removed them, as they both violate the Posting Guidelines.
Links containing advertisements are not allowed, and are generally considered to be spam.
(Especially when said advertisement is no more than an attempt to get your email address into a spammers mailing-list, like one of your links was)

Please try to refrain from posting links like that in the future.

Thanks.
MODERATOR
Aug 25 '08 #6
Atli
5,058 Recognized Expert Expert
If you want to try to query the server, you could use the socket functions to communicate with a mail server.

A typical mail SMTP query goes like:
(from Wikipedia)
Expand|Select|Wrap|Line Numbers
  1. S: 220 smtp.example.com ESMTP Postfix
  2. C: HELO relay.example.org
  3. S: 250 Hello relay.example.org, I am glad to meet you
  4. C: MAIL FROM:<bob@example.org>
  5. S: 250 Ok
  6. C: RCPT TO:<alice@example.com>
  7. S: 250 Ok
  8.  
If that last line is 250 Ok, as it is, the email should be valid, according to the server.
Aug 25 '08 #7
Markus
6,050 Recognized Expert Expert
If you want to try to query the server, you could use the socket functions to communicate with a mail server.

A typical mail SMTP query goes like:
(from Wikipedia)
Expand|Select|Wrap|Line Numbers
  1. S: 220 smtp.example.com ESMTP Postfix
  2. C: HELO relay.example.org
  3. S: 250 Hello relay.example.org, I am glad to meet you
  4. C: MAIL FROM:<bob@example.org>
  5. S: 250 Ok
  6. C: RCPT TO:<alice@example.com>
  7. S: 250 Ok
  8.  
If that last line is 250 Ok, as it is, the email should be valid, according to the server.
But as you said: this isn't reliable. I don't see the problem with mailing the user an activation key to their given email address.
Aug 25 '08 #8
Atli
5,058 Recognized Expert Expert
But as you said: this isn't reliable. I don't see the problem with mailing the user an activation key to their given email address.
Me neither, but if he doesn't want to do that, he's got very little choice.

This is made unreliable for a reason. If a server gives out this sort of info to easily, spammers could simply query mail servers in a "brute-force" manner and get a complete list of valid emails, which is not good, obviously.
Aug 25 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
3003
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email...
2
5255
by: Wayne Wengert | last post by:
I want to write a Windows application to go through all the email addresses in an SQL Server table and to report which ones are invalid. From Googling and perusing NGs it is my understanding that...
2
1637
by: toedipper | last post by:
Hello, php and mysql I am looking to start a newsletter on my site. I imagine I will have a text box that users enter their email address into and a button that says 'subscribe' To stop...
0
1708
by: comp.lang.php | last post by:
I wrote a method that should check if an email address is valid. In another method I've already checked to see if $_POST exists and is well-formed, so those checks are not necessary in this scope....
4
1730
by: sangam56 | last post by:
I have used cookieless mode of ASPState sql server session mode. I have used the CreateUserWizard to register user in the web site. And users must click the email verification link before being...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.