equal
deleted
inserted
replaced
9 * Licensed under the GNU GPL. For full terms see the file COPYING. |
9 * Licensed under the GNU GPL. For full terms see the file COPYING. |
10 * |
10 * |
11 * POP3 class |
11 * POP3 class |
12 * |
12 * |
13 * @copyright 1999-2011 The SquirrelMail Project Team |
13 * @copyright 1999-2011 The SquirrelMail Project Team |
14 * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
14 * @license https://opensource.org/licenses/gpl-license.php GNU Public License |
15 * @package plugins |
15 * @package plugins |
16 * @subpackage mail_fetch |
16 * @subpackage mail_fetch |
17 */ |
17 */ |
18 |
18 |
19 class POP3 { |
19 class POP3 { |
57 $this->MAILSERVER = $server; |
57 $this->MAILSERVER = $server; |
58 } |
58 } |
59 if(!empty($timeout)) { |
59 if(!empty($timeout)) { |
60 settype($timeout,"integer"); |
60 settype($timeout,"integer"); |
61 $this->TIMEOUT = $timeout; |
61 $this->TIMEOUT = $timeout; |
62 set_time_limit($timeout); |
62 if(function_exists("set_time_limit")){ |
|
63 set_time_limit($timeout); |
|
64 } |
63 } |
65 } |
64 return true; |
66 return true; |
65 } |
67 } |
66 |
68 |
67 /** |
69 /** |
70 public function POP3( $server = '', $timeout = '' ) { |
72 public function POP3( $server = '', $timeout = '' ) { |
71 self::__construct( $server, $timeout ); |
73 self::__construct( $server, $timeout ); |
72 } |
74 } |
73 |
75 |
74 function update_timer () { |
76 function update_timer () { |
75 set_time_limit($this->TIMEOUT); |
77 if(function_exists("set_time_limit")){ |
|
78 set_time_limit($this->TIMEOUT); |
|
79 } |
76 return true; |
80 return true; |
77 } |
81 } |
78 |
82 |
79 function connect ($server, $port = 110) { |
83 function connect ($server, $port = 110) { |
80 // Opens a socket to the specified server. Unless overridden, |
84 // Opens a socket to the specified server. Unless overridden, |
441 function send_cmd ( $cmd = "" ) |
445 function send_cmd ( $cmd = "" ) |
442 { |
446 { |
443 // Sends a user defined command string to the |
447 // Sends a user defined command string to the |
444 // POP server and returns the results. Useful for |
448 // POP server and returns the results. Useful for |
445 // non-compliant or custom POP servers. |
449 // non-compliant or custom POP servers. |
446 // Do NOT includ the \r\n as part of your command |
450 // Do NOT include the \r\n as part of your command |
447 // string - it will be appended automatically. |
451 // string - it will be appended automatically. |
448 |
452 |
449 // The return value is a standard fgets() call, which |
453 // The return value is a standard fgets() call, which |
450 // will read up to $this->BUFFER bytes of data, until it |
454 // will read up to $this->BUFFER bytes of data, until it |
451 // encounters a new line, or EOF, whichever happens first. |
455 // encounters a new line, or EOF, whichever happens first. |