![](/img/trans.png)
[英]How to do batch retreival of email using Zend_Mail_Protocol_Imap or Zend_Mail_Storage_Imap
[英]getting error message PHP Fatal error: Call to undefined method Zend_Mail_Storage_Imap::requestAndResponse()
我是Zend Framework的新手。 我正在開發一個使用該類(已添加到Zend/Mail/Storage/Imap.php
)通過Gmail收件箱搜索的應用程序。
/**
* do a search request
*
* This method is currently marked as internal as the API might change and is not
* safe if you don't take precautions.
*
* @internal
* @return array message ids
*/
public function search(array $params)
{
$response = $this->requestAndResponse('SEARCH', $params);
if (!$response) {
return $response;
}
foreach ($response as $ids) {
if ($ids[0] == 'SEARCH') {
array_shift($ids);
return $ids;
}
}
return array();
}
我這樣稱呼它:
$searchresults = $storage->search(array('search_terms'));
但是每次我嘗試運行它時,都會顯示一個錯誤:
PHP致命錯誤:在第655行的/public_html/test06/Zend/Mail/Storage/Imap.php中,調用未定義方法Zend_Mail_Storage_Imap :: requestAndResponse()
似乎requestAndResponse的調用方式未定義。 我不使用ZF,但是您確定requestAndResponse接受您要發送的2參數。 我的意思是(“ SEARCH”,$ params)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.