From c59439f1ef3b6fb0f1c742bb3aa84e713d157a1f Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Sat, 18 Jan 2014 13:11:45 +0000 Subject: [PATCH] try to figure out generic error: IMAP error reported by server on structure retrieval --- mail/inc/class.mail_activesync.inc.php | 3 ++- mail/inc/class.mail_bo.inc.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mail/inc/class.mail_activesync.inc.php b/mail/inc/class.mail_activesync.inc.php index 51ca43f320..1de226261c 100644 --- a/mail/inc/class.mail_activesync.inc.php +++ b/mail/inc/class.mail_activesync.inc.php @@ -1014,6 +1014,7 @@ class mail_activesync implements activesync_plugin_write, activesync_plugin_send public function GetMessage($folderid, $id, $truncsize, $bodypreference=false, $optionbodypreference=false, $mimesupport = 0) { //$this->debugLevel=4; + if (!isset($this->mail)) $this->mail = mail_bo::getInstance(false,self::$profileID); debugLog(__METHOD__.__LINE__.' FolderID:'.$folderid.' ID:'.$id.' TruncSize:'.$truncsize.' Bodypreference: '.array2string($bodypreference)); $stat = $this->StatMessage($folderid, $id); if ($this->debugLevel>3) debugLog(__METHOD__.__LINE__.array2string($stat)); @@ -1026,7 +1027,7 @@ class mail_activesync implements activesync_plugin_write, activesync_plugin_send $headers = $this->mail->getMessageHeader($id,'',true,true); if (empty($headers)) { - error_log(__METHOD__.__LINE__.' Retrieval of Headers Failed! for .'.$this->account.' ServerID:'.self::$profileID.'FolderID:'.$folderid.' ID:'.$id.' TruncSize:'.$truncsize.' Bodypreference: '.array2string($bodypreference).' Stat was:'.array2string($stat)); + error_log(__METHOD__.__LINE__.' Retrieval of Headers Failed! for .'.$this->account.'/'.$GLOBALS['egw_info']['user']['account_lid'].' ServerID:'.self::$profileID.'FolderID:'.$folderid.' ID:'.$id.' TruncSize:'.$truncsize.' Bodypreference: '.array2string($bodypreference).' Stat was:'.array2string($stat)); return $output;//empty object } //$rawHeaders = $this->mail->getMessageRawHeader($id); diff --git a/mail/inc/class.mail_bo.inc.php b/mail/inc/class.mail_bo.inc.php index fcd9ee491d..b7ba481322 100644 --- a/mail/inc/class.mail_bo.inc.php +++ b/mail/inc/class.mail_bo.inc.php @@ -4358,7 +4358,7 @@ class mail_bo } catch (Exception $e) { - error_log(__METHOD__.__LINE__.' Could not fetch structure on mail:'.$_uid.' Serverprofile->'.$this->icServer->ImapServerId.' Message:'.$e->getMessage()); + error_log(__METHOD__.__LINE__.' Could not fetch structure on mail:'.$_uid.' Serverprofile->'.$this->icServer->ImapServerId.' Message:'.$e->getMessage().' Stack:'.function_backtrace()); return null; } }