Revision 1374
Added by Dietmar almost 14 years ago
class.pop3.php | ||
---|---|---|
47 | 47 |
{ |
48 | 48 |
/** |
49 | 49 |
* Default POP3 port |
50 |
* @var int
|
|
50 |
* @var int |
|
51 | 51 |
*/ |
52 | 52 |
var $POP3_PORT = 110; |
53 | 53 |
|
54 | 54 |
/** |
55 | 55 |
* Default Timeout |
56 |
* @var int
|
|
56 |
* @var int |
|
57 | 57 |
*/ |
58 | 58 |
var $POP3_TIMEOUT = 30; |
59 | 59 |
|
60 | 60 |
/** |
61 | 61 |
* POP3 Carriage Return + Line Feed |
62 |
* @var string
|
|
62 |
* @var string |
|
63 | 63 |
*/ |
64 | 64 |
var $CRLF = "\r\n"; |
65 | 65 |
|
66 | 66 |
/** |
67 | 67 |
* Displaying Debug warnings? (0 = now, 1+ = yes) |
68 |
* @var int
|
|
68 |
* @var int |
|
69 | 69 |
*/ |
70 | 70 |
var $do_debug = 2; |
71 | 71 |
|
72 | 72 |
/** |
73 | 73 |
* POP3 Mail Server |
74 |
* @var string
|
|
74 |
* @var string |
|
75 | 75 |
*/ |
76 | 76 |
var $host; |
77 | 77 |
|
78 | 78 |
/** |
79 | 79 |
* POP3 Port |
80 |
* @var int
|
|
80 |
* @var int |
|
81 | 81 |
*/ |
82 | 82 |
var $port; |
83 | 83 |
|
84 | 84 |
/** |
85 | 85 |
* POP3 Timeout Value |
86 |
* @var int
|
|
86 |
* @var int |
|
87 | 87 |
*/ |
88 | 88 |
var $tval; |
89 | 89 |
|
90 | 90 |
/** |
91 | 91 |
* POP3 Username |
92 |
* @var string
|
|
92 |
* @var string |
|
93 | 93 |
*/ |
94 | 94 |
var $username; |
95 | 95 |
|
96 | 96 |
/** |
97 | 97 |
* POP3 Password |
98 |
* @var string
|
|
98 |
* @var string |
|
99 | 99 |
*/ |
100 | 100 |
var $password; |
101 | 101 |
|
102 | 102 |
/**#@+ |
103 |
* @access private
|
|
103 |
* @access private |
|
104 | 104 |
*/ |
105 | 105 |
var $pop_conn; |
106 | 106 |
var $connected; |
... | ... | |
110 | 110 |
/** |
111 | 111 |
* Constructor, sets the initial values |
112 | 112 |
* |
113 |
* @return POP3
|
|
113 |
* @return POP3 |
|
114 | 114 |
*/ |
115 | 115 |
function POP3 () |
116 | 116 |
{ |
... | ... | |
122 | 122 |
/** |
123 | 123 |
* Combination of public events - connect, login, disconnect |
124 | 124 |
* |
125 |
* @param string $host
|
|
126 |
* @param integer $port
|
|
127 |
* @param integer $tval
|
|
128 |
* @param string $username
|
|
129 |
* @param string $password
|
|
125 |
* @param string $host |
|
126 |
* @param integer $port |
|
127 |
* @param integer $tval |
|
128 |
* @param string $username |
|
129 |
* @param string $password |
|
130 | 130 |
*/ |
131 | 131 |
function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) |
132 | 132 |
{ |
... | ... | |
184 | 184 |
/** |
185 | 185 |
* Connect to the POP3 server |
186 | 186 |
* |
187 |
* @param string $host
|
|
188 |
* @param integer $port
|
|
189 |
* @param integer $tval
|
|
190 |
* @return boolean
|
|
187 |
* @param string $host |
|
188 |
* @param integer $port |
|
189 |
* @param integer $tval |
|
190 |
* @return boolean |
|
191 | 191 |
*/ |
192 | 192 |
function Connect ($host, $port = false, $tval = 30) |
193 | 193 |
{ |
... | ... | |
270 | 270 |
/** |
271 | 271 |
* Login to the POP3 server (does not support APOP yet) |
272 | 272 |
* |
273 |
* @param string $username
|
|
274 |
* @param string $password
|
|
275 |
* @return boolean
|
|
273 |
* @param string $username |
|
274 |
* @param string $password |
|
275 |
* @return boolean |
|
276 | 276 |
*/ |
277 | 277 |
function Login ($username = '', $password = '') |
278 | 278 |
{ |
... | ... | |
344 | 344 |
* Get the socket response back. |
345 | 345 |
* $size is the maximum number of bytes to retrieve |
346 | 346 |
* |
347 |
* @param integer $size
|
|
348 |
* @return string
|
|
347 |
* @param integer $size |
|
348 |
* @return string |
|
349 | 349 |
*/ |
350 | 350 |
function getResponse ($size = 128) |
351 | 351 |
{ |
... | ... | |
357 | 357 |
/** |
358 | 358 |
* Send a string down the open socket connection to the POP3 server |
359 | 359 |
* |
360 |
* @param string $string
|
|
361 |
* @return integer
|
|
360 |
* @param string $string |
|
361 |
* @return integer |
|
362 | 362 |
*/ |
363 | 363 |
function sendString ($string) |
364 | 364 |
{ |
... | ... | |
371 | 371 |
/** |
372 | 372 |
* Checks the POP3 server response for +OK or -ERR |
373 | 373 |
* |
374 |
* @param string $string
|
|
375 |
* @return boolean
|
|
374 |
* @param string $string |
|
375 |
* @return boolean |
|
376 | 376 |
*/ |
377 | 377 |
function checkResponse ($string) |
378 | 378 |
{ |
... | ... | |
417 | 417 |
/** |
418 | 418 |
* Takes over from PHP for the socket warning handler |
419 | 419 |
* |
420 |
* @param integer $errno
|
|
421 |
* @param string $errstr
|
|
422 |
* @param string $errfile
|
|
423 |
* @param integer $errline
|
|
420 |
* @param integer $errno |
|
421 |
* @param string $errstr |
|
422 |
* @param string $errfile |
|
423 |
* @param integer $errline |
|
424 | 424 |
*/ |
425 | 425 |
function catchWarning ($errno, $errstr, $errfile, $errline) |
426 | 426 |
{ |
Also available in: Unified diff
fixed headerinfos