mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 17:19:06 +01:00
some servers seem to sent their responses for the content not with the first EXT section, so we loop through the parsed response until we find some matching content
This commit is contained in:
parent
28354db5d5
commit
ce46dc40d6
@ -592,7 +592,12 @@ class Net_IMAP extends Net_IMAPProtocol {
|
|||||||
if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
|
if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
|
||||||
return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
|
return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
|
||||||
}
|
}
|
||||||
$ret=$ret["PARSED"][0]["EXT"]["BODY[$partId]"]["CONTENT"];
|
$found = 0;
|
||||||
|
foreach($ret["PARSED"] as $key => $value)
|
||||||
|
{
|
||||||
|
if (isset($ret["PARSED"][$key]["EXT"]["BODY[$partId]"]["CONTENT"])) {$found = $key; break;}
|
||||||
|
}
|
||||||
|
$ret=$ret["PARSED"][$found]["EXT"]["BODY[$partId]"]["CONTENT"];
|
||||||
//$ret=$resp["PARSED"][0]["EXT"]["RFC822"]["CONTENT"];
|
//$ret=$resp["PARSED"][0]["EXT"]["RFC822"]["CONTENT"];
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
@ -1874,6 +1879,7 @@ class Net_IMAP extends Net_IMAPProtocol {
|
|||||||
if (PEAR::isError($ret)) {
|
if (PEAR::isError($ret)) {
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
|
if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
|
||||||
return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
|
return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user