OK Gimap ready for requests from USER BAD Unknown command PASS BAD Unknown command

1,046 views
Skip to first unread message

Ozgun Unlu

unread,
Dec 28, 2013, 11:30:43 AM12/28/13
to gmail...@googlegroups.com
Iheader('Content-Type: text/html; charset=utf-8');
$uname = "ozgun...@gmail.com";
$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);
}

Marko Vukovic

unread,
Dec 28, 2013, 5:06:06 PM12/28/13
to gmail...@googlegroups.com
Hi

Firstly, you haven't actually asked a question. 
Secondly, I hope that's not your real password. 
Thirdly, I am going to guess. Looks to me like you are connecting to the IMAP server but you are issuing POP commands. 

--
Marko
--
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 gmail-users...@googlegroups.com.
To post to this group, send email to gmail...@googlegroups.com.
Visit this group at http://groups.google.com/group/gmail-users.
For more options, visit https://groups.google.com/groups/opt_out.

Marko Vukovic

unread,
Dec 29, 2013, 1:45:20 AM12/29/13
to gmail...@googlegroups.com
Just to add to my previous reply, if you are wanting the POP3 server, s/993/995 :P
--
Marko

Reply all
Reply to author
Forward
0 new messages