|
@@ -62,8 +62,9 @@ abstract class Zend_Mail_Protocol_Abstract
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Maximum of the transaction log
|
|
* Maximum of the transaction log
|
|
|
|
|
+ * @var integer
|
|
|
*/
|
|
*/
|
|
|
- const MAXIMUM_LOG = 64;
|
|
|
|
|
|
|
+ protected $_maximumLog = 64;
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -159,6 +160,28 @@ abstract class Zend_Mail_Protocol_Abstract
|
|
|
$this->_disconnect();
|
|
$this->_disconnect();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Set the maximum log size
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param integer $maximumLog Maximum log size
|
|
|
|
|
+ * @return void
|
|
|
|
|
+ */
|
|
|
|
|
+ public function setMaximumLog($maximumLog)
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->_maximumLog = (int) $maximumLog;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Get the maximum log size
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return int the maximum log size
|
|
|
|
|
+ */
|
|
|
|
|
+ public function setMaximumLog($maximumLog)
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->_maximumLog;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Create a connection to the remote host
|
|
* Create a connection to the remote host
|
|
@@ -219,7 +242,7 @@ abstract class Zend_Mail_Protocol_Abstract
|
|
|
*/
|
|
*/
|
|
|
protected function _addLog($value)
|
|
protected function _addLog($value)
|
|
|
{
|
|
{
|
|
|
- if (count($this->_log) >= self::MAXIMUM_LOG) {
|
|
|
|
|
|
|
+ if ($this->_maximumLog >= 0 && count($this->_log) >= $this->_maximumLog) {
|
|
|
array_shift($this->_log);
|
|
array_shift($this->_log);
|
|
|
}
|
|
}
|
|
|
|
|
|