email verification

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hmkaddoura
    New Member
    • Feb 2008
    • 18

    email verification

    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
    Last edited by Atli; Aug 25 '08, 10:04 AM. Reason: Removed links.
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    why do you need this? for your application? or are you trying to build this to provide this verification service for users?

    Comment

    • hmkaddoura
      New Member
      • Feb 2008
      • 18

      #3
      it is used for my application..I want to send more than 40000 emails but many of them are not valid.

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        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.

        Comment

        • hmkaddoura
          New Member
          • Feb 2008
          • 18

          #5
          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.
          Last edited by Atli; Aug 25 '08, 10:04 AM. Reason: Link removed

          Comment

          • Atli
            Recognized Expert Expert
            • Nov 2006
            • 5062

            #6
            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

            Comment

            • Atli
              Recognized Expert Expert
              • Nov 2006
              • 5062

              #7
              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)
              Code:
              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.

              Comment

              • Markus
                Recognized Expert Expert
                • Jun 2007
                • 6092

                #8
                Originally posted by Atli
                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)
                Code:
                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.

                Comment

                • Atli
                  Recognized Expert Expert
                  • Nov 2006
                  • 5062

                  #9
                  Originally posted by markusn00b
                  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.

                  Comment

                  Working...