Question

I am using the IMAP-module from Zend Framework to interact with Gmail.

But I need to implement to XLIST command (http://code.google.com/intl/nl-NL/apis/gmail/imap/#xlist) to get folder names. But I don't have any clue how to do this with Zend...

Is there anybody who can help me?

Thanks!

Was it helpful?

Solution

Use the requestAndResponse method to send arbitrary IMAP commands (from the Zend_Mail_Protocol_Imap class, not from the Zend_Mail_Storage_Imap class).

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

OTHER TIPS

I think Zend only supports the "list" command wich provides you with local and global folder names.

I have searched the lib for "xlist" and found nothing.

Zend Mail (Read mails and folders)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top