try to catch errors on structure retrieval

This commit is contained in:
Klaus Leithoff 2014-01-17 13:05:23 +00:00
parent ff29574173
commit 38dcee204a

View File

@ -4331,11 +4331,12 @@ class mail_bo
}
$uidsToFetch = new Horde_Imap_Client_Ids();
$uidsToFetch->add((array)$_uid);
try
{
$_fquery = new Horde_Imap_Client_Fetch_Query();
// not sure why Klaus add these, seem not necessary
// $fquery->envelope();
// $fquery->size();
// not sure why Klaus add these, seem not necessary
// $fquery->envelope();
// $fquery->size();
$_fquery->structure();
if ($_partID) $_fquery->bodyPart($_partID, array('peek' => $_preserveSeen));
@ -4345,6 +4346,12 @@ class mail_bo
return $mail->getStructure();
}
catch (Exception $e)
{
error_log(__METHOD__.__LINE__.' Could not fetch structure on mail:'.$_uid.' Serverprofile->'.$this->icServer->ImapServerId.' Message:'.$e->getMessage());
return null;
}
}
/**
* Parse the structure for attachments