Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/03/2011, 19:40
eduardo160
 
Fecha de Ingreso: julio-2010
Mensajes: 523
Antigüedad: 13 años, 8 meses
Puntos: 4
saber si esto sirve?

hola creo que aparte de un aporte quisiera saber con ustedes colegas si esto podria resultar...encontre un codigo para saber si el e-mail existe...no de ke si existe en la bd si no ke si existe en el hotmail o cualquiera...osea si el mail esta registrado o no

Código PHP:
// Step 4 -- Connect to mail server and check e-mail address (OPTIONAL) 

// Finally, once you have the best guess at a mail server, it's time to open a connection and talk to the server. As I stated earlier, this step is optional. After every command you send, you'll need to read a kilobyte (1024 bytes) of data from the server. It should be more than enough to receive the complete response from the server for that command. 

// Note that you'll store the output from the server in three separate variables: $To, $From and $Out. This is done so you can check the responses after you close the connection, to see if you actually have a real e-mail address or not. 

// If the script cannot connect at all, or the e-mail address wasn't valid, set the $result array to the proper values: 

        
$Connect fsockopen $ConnectAddress25 ); 

    if (
$Connect) { 

        if (
ereg("^220"$Out fgets($Connect1024))) { 

           
fputs ($Connect"HELO $HTTP_HOST\r\n"); 
           
$Out fgets $Connect1024 ); 
           
fputs ($Connect"MAIL FROM: <{$Email}>\r\n"); 
           
$From fgets $Connect1024 ); 
           
fputs ($Connect"RCPT TO: <{$Email}>\r\n"); 
           
$To fgets ($Connect1024); 
           
fputs ($Connect"QUIT\r\n"); 
           
fclose($Connect); 
            if (!
ereg ("^250"$From) || 
!
ereg "^250"$To )) { 
               
$result[0]=false
               
$result[1]="Server rejected address"
               return 
$result

            } 
        } else { 

            
$result[0] = false
            
$result[1] = "No response from server"
            return 
$result
          } 

    }  else { 

        
$result[0]=false
        
$result[1]="Can not connect E-Mail server."
        return 
$result
    } 

// Step 5 -- Return the results 

// Finally, our last and easiest step is to return the results and finish: 
    
$result[0]=true
    
$result[1]="$Email appears to be valid."
    return 
$result
// end of function