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
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?
it is used for my application..I want to send more than 40000 emails but many of them are not valid.
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.
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.
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
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) -
S: 220 smtp.example.com ESMTP Postfix
-
C: HELO relay.example.org
-
S: 250 Hello relay.example.org, I am glad to meet you
-
C: MAIL FROM:<bob@example.org>
-
S: 250 Ok
-
C: RCPT TO:<alice@example.com>
-
S: 250 Ok
-
If that last line is 250 Ok, as it is, the email should be valid, according to the server.
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) -
S: 220 smtp.example.com ESMTP Postfix
-
C: HELO relay.example.org
-
S: 250 Hello relay.example.org, I am glad to meet you
-
C: MAIL FROM:<bob@example.org>
-
S: 250 Ok
-
C: RCPT TO:<alice@example.com>
-
S: 250 Ok
-
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.
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.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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...
|
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...
|
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....
|
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...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |