i have been using fsockopen() to check whether a url is valid or not and i was wondering if i can validate an email address with this or a similar function.

    You probably could, but you'll have to connect on port 25 of the e-mail's host, and you'll have to know how smtp works.

    Di

      Yes, plus don't forget that many SMTP server
      have the VERIFY command disabled (for
      avoiding SPAM) so ...

      The classical of validating is first, using
      a regular expression to check the validity
      but only the validity of the syntax.

      It can tell you that "john.doe@yahoo.com"
      is a valid email address ; this doesn't
      tell you that this address exist or this
      address is the real address of the person.

      So usually, you send an email to the
      address and the msg contains an URL
      which do the validation (the person need
      to read the msg and click on the URL to
      activate his account)

        Write a Reply...