开发者

PHP, login to pop3-server

开发者 https://www.devze.com 2022-12-28 15:57 出处:网络
I have another one problem with pop3. Here is connection to pop3-server: $pop3Server = \'62.113.86.215\';// mail.rol开发者_开发百科ler.ru

I have another one problem with pop3. Here is connection to pop3-server:

$pop3Server = '62.113.86.215';  // mail.rol开发者_开发百科ler.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


'\r\n' should be "\r\n". http://php.net/types.string


There are libraries to do that kind of stuff. Take a look, for example, at here: http://phpmailer.worxware.com/index.php?pg=examplebpop

0

精彩评论

暂无评论...
验证码 换一张
取 消