mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-20 09:58:07 +02:00
try to catch errors on structure retrieval
This commit is contained in:
parent
ff29574173
commit
38dcee204a
@ -4331,19 +4331,26 @@ class mail_bo
|
|||||||
}
|
}
|
||||||
$uidsToFetch = new Horde_Imap_Client_Ids();
|
$uidsToFetch = new Horde_Imap_Client_Ids();
|
||||||
$uidsToFetch->add((array)$_uid);
|
$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();
|
||||||
|
$_fquery->structure();
|
||||||
|
if ($_partID) $_fquery->bodyPart($_partID, array('peek' => $_preserveSeen));
|
||||||
|
|
||||||
$_fquery = new Horde_Imap_Client_Fetch_Query();
|
$mail = $this->icServer->fetch($_folder, $_fquery, array(
|
||||||
// not sure why Klaus add these, seem not necessary
|
'ids' => $uidsToFetch,
|
||||||
// $fquery->envelope();
|
))->first();
|
||||||
// $fquery->size();
|
|
||||||
$_fquery->structure();
|
|
||||||
if ($_partID) $_fquery->bodyPart($_partID, array('peek' => $_preserveSeen));
|
|
||||||
|
|
||||||
$mail = $this->icServer->fetch($_folder, $_fquery, array(
|
return $mail->getStructure();
|
||||||
'ids' => $uidsToFetch,
|
}
|
||||||
))->first();
|
catch (Exception $e)
|
||||||
|
{
|
||||||
return $mail->getStructure();
|
error_log(__METHOD__.__LINE__.' Could not fetch structure on mail:'.$_uid.' Serverprofile->'.$this->icServer->ImapServerId.' Message:'.$e->getMessage());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user