【问题标题】:How to use Gmail XLIST command with Zend Framework IMAP?如何在 Zend Framework IMAP 中使用 Gmail XLIST 命令?
【发布时间】:2011-05-17 10:25:04
【问题描述】:

我正在使用 Zend Framework 中的 IMAP 模块与 Gmail 交互。

但我需要执行 XLIST 命令 (http://code.google.com/intl/nl-NL/apis/gmail/imap/#xlist) 来获取文件夹名称。但是我不知道如何使用 Zend 来做到这一点......

有人可以帮我吗?

谢谢!

【问题讨论】:

    标签: php zend-framework gmail imap gmail-imap


    【解决方案1】:

    使用 requestAndResponse 方法发送任意 IMAP 命令(来自 Zend_Mail_Protocol_Imap 类,而不是来自 Zend_Mail_Storage_Imap 类)。

    $imap = new Zend_Mail_Protocol_Imap('imap.gmail.com', '993', true);
    // ... login with OAuth etc.
    $response = $imap->requestAndResponse('XLIST', $imap->escapeString('', '*'));
    

    【讨论】:

      【解决方案2】:

      我认为 Zend 只支持“list”命令,它为您提供本地和全局文件夹名称。

      我在 lib 中搜索了“xlist”,但一无所获。

      Zend Mail (Read mails and folders)

      【讨论】:

      • 是的,但可以使用 Zend 进行自定义提取操作。所以我认为使用 Xlist 是可能的......?
      猜你喜欢
      • 2012-01-16
      • 2011-04-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-25
      • 2012-10-09
      相关资源
      最近更新 更多