april fool's day is over! Only in lib.20060401/Zend/Mail/Read: Autodetect.php diff -wru lib.20060328/Zend/Mail/Read/Mbox.php lib.20060401/Zend/Mail/Read/Mbox.php --- lib.20060328/Zend/Mail/Read/Mbox.php 2006-03-28 22:42:56.000000000 +0200 +++ lib.20060401/Zend/Mail/Read/Mbox.php 2006-04-01 02:38:23.000000000 +0200 @@ -159,7 +159,8 @@ public function __construct($params) { if(!isset($params['filename']) /* || Zend::isReadable($params['filename']) */) { - throw new Zend_Mail_Exception('no valid filename given in params'); + Zend::loadClass('Zend_Mail_Read_Autodetect'); + $params['filename'] = Zend_Mail_Read_Autodetect::filename('*.mbox', Zend_Mail_Read_Autodetect::INCLUDE_PATH); } $this->_fh = fopen($params['filename'], 'r'); diff -wru lib.20060328/Zend/Mail/Read/Pop3.php lib.20060401/Zend/Mail/Read/Pop3.php --- lib.20060328/Zend/Mail/Read/Pop3.php 2006-03-28 21:43:46.000000000 +0200 +++ lib.20060401/Zend/Mail/Read/Pop3.php 2006-04-01 02:43:21.000000000 +0200 @@ -126,9 +126,10 @@ */ public function __construct($params) { - if(!isset($params['host']) || !isset($params['user'])) { - throw new Zend_Mail_Exception('need at least a host an user in params'); + Zend::loadClass('Zend_Mail_Read_Autodetect'); + $settings = isset($params['auto']) ? $params['auto'] : (isset($this->auto) ? $this->auto : Zend_Mail_Read_Autodetect::TRY_ALL); + $params = Zend_Mail_Read_Autodetect::findPop3($settings, get_class($this)); } $params['password'] = isset($params['password']) ? $params['password'] : ''; $params['port'] = isset($params['port']) ? $params['port'] : 110;