I am using Zend framework to fetch email messages from Gmail, Currently I am only able to get messages in INBOX only, After Authentication i setToken and other parameters
$imap->requestAndResponse('AUTHENTICATE', $authenticateParams);
$response = $imap->requestAndResponse('XLIST', $imap->escapeString('', '*'));
in the $responce Variable i am getting list of all my Labels/folders
Array
(
[0] => Array
(
[0] => XLIST
[1] => Array
(
[0] => \HasNoChildren
)
[2] => /
[3] => Calendar
).................... INBOX, Sent Mails Etc
and so on, After doing some code and fetching Names on Index [3] Which are my Labels and Folders.
i Have list in array like below.
Array
(
[0] => Calendar
[1] => Drafts
[2] => Facebook Mails
[3] => Inbox
[4] => Junk E-mail
[5] => Logs
[6] => Personal Mails
[7] => Sent Items
[8] => Office Mails
)
Now i want to fetch emails in each message/folders
I tried Zend_Mail_Storage_Folder_Maildir
but i do not Know exactly how to fetch messages in each of the above folder, I am using Imap,
By Opening Storage like below
$storage = new Zend_Mail_Storage_Imap($imap);
This only returns mails in Inbox Folder.