Iheader('Content-Type: text/html; charset=utf-8');
$uname = "[email protected]";
$pass = "12304582";
$data[1] = "";
$k=0;
$fp = fsockopen('ssl://imap.gmail.com', '993', $errno, $errstr);
if(!$fp){
echo "WRONG!";
exit;
}else{
echo "OK!<br />";
fputs($fp, "USER *****@gmail.com\r\n");
fputs($fp, "PASS *****\r\n");
$message = fputs($fp, "STAT\r\n");
echo $message . "<br />";
$row = fputs($fp, "RETR 1\r\n");
while($k != 5){
$row = fgets($fp, 512);
$data[1] .= $row;
$k++;
}
echo $data[1];
//list($header, $body, ) = explode("\r\n\r\n", $data[1]);
//echo $body;
fputs($fp, "QUIT\r\n");
fclose($fp);
}

-- 
You received this message because you are subscribed to the Google Groups 
"Gmail-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/gmail-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to