Net_POP3::connect() – Connection to POP3 server


require_once 'Net/POP3.php';

boolean Net_POP3::connect ( string $host , integer $port )


Connects to the given host on the given port. Also looks for the timestamp in the greeting needed for APOP authentication.


  • string $host - Hostname/IP address to connect to

  • integer $port - Port to use to connect to on host

Return value

boolean - Returns TRUE on success, FALSE on failure.


This function can not be called statically.

Constructor (Previous) Marks a message for deletion (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

Note by:
If you want to connect to a server with SSL use ssl:// before the POP3 Server Address.


$pop3 = new Net_POP3();
$strServerName = "ssl://";
$intPortNo = '995';
$pop3->connect($strServerName, $intPortNo);