<?php
- /**
- * mail_fetch/setup.php
- *
- * Copyright (c) 1999-2005 The SquirrelMail Project Team
- *
- * Copyright (c) 1999 CDI (cdi@thewebmasters.net) All Rights Reserved
- * Modified by Philippe Mingo 2001 mingo@rotedic.com
- * An RFC 1939 compliant wrapper class for the POP3 protocol.
- *
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * pop3 class
- *
- * $Id$
- * @package plugins
- * @subpackage mail_fetch
- */
+/**
+ * mail_fetch/class.POP3.php
+ *
+ * Copyright (c) 1999 CDI (cdi@thewebmasters.net) All Rights Reserved
+ * Modified by Philippe Mingo 2001 mingo@rotedic.com
+ * An RFC 1939 compliant wrapper class for the POP3 protocol.
+ *
+ * POP3 class
+ *
+ * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package plugins
+ * @subpackage mail_fetch
+ */
/**
- * This is the pop3 class - DOCUMENT ME
- * @package squirrelmail
+ * This is the POP3 class - DOCUMENT ME
+ * @package plugins
+ * @subpackage mail_fetch
*/
class POP3 {
var $ERROR = ''; // Error string.
$fp = @fsockopen("$server", $port, $errno, $errstr);
if(!$fp) {
- $this->ERROR = _("POP3 connect:") . ' ' . _("Error ") . "[$errno] [$errstr]";
+ $this->ERROR = _("POP3 connect:") . ' ' . _("Error") . ' ' . "[$errno] [$errstr]";
unset($this->FP);
return false;
}
if($this->DEBUG)
error_log("POP3 SEND [connect: $server] GOT [$reply]",0);
if(!$this->is_ok($reply)) {
- $this->ERROR = _("POP3 connect:") . ' ' . _("Error ") . "[$reply]";
+ $this->ERROR = _("POP3 connect:") . ' ' . _("Error") . ' ' . "[$reply]";
unset($this->FP);
return false;
}
} else {
$reply = $this->send_cmd("USER $user");
if(!$this->is_ok($reply)) {
- $this->ERROR = _("POP3 user:") . ' ' . _("Error ") . "[$reply]";
+ $this->ERROR = _("POP3 user:") . ' ' . _("Error") . ' ' . "[$reply]";
return false;
} else
return true;
} else {
$reply = $this->send_cmd("PASS $pass");
if(!$this->is_ok($reply)) {
- $this->ERROR = _("POP3 pass:") . ' ' . _("authentication failed ") . "[$reply]";
+ $this->ERROR = _("POP3 pass:") . ' ' . _("Authentication failed") . " [$reply]";
$this->quit();
return false;
} else {
}
if(!$this->is_ok($reply))
{
- $this->ERROR = _("POP3 top:") . ' ' . _("Error ") . "[$reply]";
+ $this->ERROR = _("POP3 top:") . ' ' . _("Error") . ' ' . "[$reply]";
return false;
}
}
if(!$this->is_ok($reply))
{
- $this->ERROR = _("POP3 pop_list:") . ' ' . _("Error ") . "[$reply]";
+ $this->ERROR = _("POP3 pop_list:") . ' ' . _("Error") . ' ' . "[$reply]";
return false;
}
list($junk,$num,$size) = preg_split('/\s+/',$reply);
if(!$this->is_ok($reply))
{
$reply = $this->strip_clf($reply);
- $this->ERROR = _("POP3 pop_list:") . ' ' . _("Error ") . "[$reply]";
+ $this->ERROR = _("POP3 pop_list:") . ' ' . _("Error") . ' ' . "[$reply]";
return false;
}
$MsgArray = array();
if(!$this->is_ok($reply))
{
- $this->ERROR = _("POP3 get:") . ' ' . _("Error ") . "[$reply]";
+ $this->ERROR = _("POP3 get:") . ' ' . _("Error") . ' ' . "[$reply]";
return false;
}
$reply = $this->send_cmd("STAT");
if(!$this->is_ok($reply))
{
- $this->ERROR = _("POP3 last:") . ' ' . _("Error ") . "[$reply]";
+ $this->ERROR = _("POP3 last:") . ' ' . _("Error") . ' ' . "[$reply]";
return $last;
}
// response - if it ever does, something truely
// wild is going on.
- $this->ERROR = _("POP3 reset:") . ' ' . _("Error ") . "[$reply]";
+ $this->ERROR = _("POP3 reset:") . ' ' . _("Error") . ' ' . "[$reply]";
@error_log("POP3 reset: ERROR [$reply]",0);
}
$this->quit();
$reply = $this->send_cmd($cmd);
if(!$this->is_ok($reply))
{
- $this->ERROR = _("POP3 uidl:") . ' ' . _("Error ") . "[$reply]";
+ $this->ERROR = _("POP3 uidl:") . ' ' . _("Error") . ' ' . "[$reply]";
return false;
}
list ($ok,$num,$myUidl) = preg_split('/\s+/',$reply);
if($this->DEBUG) { @error_log("POP3 SEND [$cmd] GOT [$reply]",0); }
if(!$this->is_ok($reply))
{
- $this->ERROR = _("POP3 uidl:") . ' ' . _("Error ") . "[$reply]";
+ $this->ERROR = _("POP3 uidl:") . ' ' . _("Error") . ' ' . "[$reply]";
return false;
}
$reply = $this->send_cmd("DELE $msgNum");
if(!$this->is_ok($reply))
{
- $this->ERROR = _("POP3 delete:") . ' ' . _("Command failed ") . "[$reply]";
+ $this->ERROR = _("POP3 delete:") . ' ' . _("Command failed") . ' ' . "[$reply]";
return false;
}
return true;
} // End class
-?>
\ No newline at end of file