PHP, login to pop3-server
Posted
by Ockonal
on Stack Overflow
See other posts from Stack Overflow
or by Ockonal
Published on 2010-04-25T16:15:22Z
Indexed on
2010/04/25
16:23 UTC
Read the original article
Hit count: 162
Hi guys, I have another one problem with pop3. Here is connection to pop3-server:
$pop3Server = '62.113.86.215'; // mail.roller.ru
$pop3User = 'mail-robot%roller.ru';
$pop_conn = fsockopen($pop3Server, 110, $errno, $errstr, 30);
echo fgets($pop_conn, 1024);
It returns OK. The next step is login:
fputs($pop_conn, 'USER '.$pop3User.'\r\n');
//stream_set_timeout($pop_conn, 3);
print fgets($pop_conn, 1024);
And I get time-out. Why?
p.s. Here is full code: http://pastie.org/934170
© Stack Overflow or respective owner