mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-08 10:38:15 +01:00
Debug IMAP with PHP_IMAP
This commit is contained in:
@@ -2803,7 +2803,11 @@ class EmailCollector extends CommonObject
|
||||
// TODO Move mail using PHP-IMAP
|
||||
}
|
||||
} else {
|
||||
dol_syslog("EmailCollector::doCollectOneCollector message ".$imapemail." to ".$connectstringtarget." was set to read", LOG_DEBUG);
|
||||
if (empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) {
|
||||
dol_syslog("EmailCollector::doCollectOneCollector message ".((string) $imapemail)." to ".$connectstringtarget." was set to read", LOG_DEBUG);
|
||||
} else {
|
||||
dol_syslog("EmailCollector::doCollectOneCollector message '".($imapemail->getHeader()->get('subject'))."' using this->host=".$this->host.", this->access_type=".$this->acces_type." was set to read", LOG_DEBUG);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$errorforemail++;
|
||||
|
||||
@@ -13,10 +13,23 @@ require_once __DIR__ . '/composer/autoload_real.php';
|
||||
return ComposerAutoloaderInit4da13270269c89a28e472e1f7324e6d1::getLoader();
|
||||
*/
|
||||
|
||||
|
||||
// Add class/method of PHP8 for compatibility with older versions of PHP
|
||||
require_once(__DIR__.'/symfony/polyfill-php80/bootstrap.php');
|
||||
|
||||
|
||||
spl_autoload_register(function ($class_name) {
|
||||
// Enable this to detect what we need for require_once
|
||||
//var_dump($class_name);
|
||||
|
||||
|
||||
$preg_match = preg_match('/^Symfony\\\Polyfill\\\Php80\\\/', $class_name);
|
||||
if (1 === $preg_match) {
|
||||
$class_name = preg_replace('/\\\/', '/', $class_name);
|
||||
$class_name = preg_replace('/^Symfony\\/Polyfill\\/Php80\\//', '', $class_name);
|
||||
require_once __DIR__ . '/symfony/polyfill-php80/' . $class_name . '.php';
|
||||
}
|
||||
|
||||
$preg_match = preg_match('/^Webklex\\\PHPIMAP\\\/', $class_name);
|
||||
if (1 === $preg_match) {
|
||||
$class_name = preg_replace('/\\\/', '/', $class_name);
|
||||
|
||||
Reference in New Issue
Block a user