You can either make the connection to the lower mailbox directly by using the correct IMAP path, or you can use imap_reopen, which takes your imap resource identifier, and the full connection string to the server with the new foldername: imap_reopen($mbox, "{imap.example.org:143}INBOX.Sent"); I hope this helps! -----Oorspronkelijk bericht----- Van: brian [mailto:cyruslist@xxxxxxxxxxxxxxx] Verzonden: maandag 19 maart 2007 19:37 Aan: info-cyrus@xxxxxxxxxxxxxxxxxxxx Onderwerp: scan subdirectory of mailbox with PHP I'm fiddling with the woefully under-documented PHP IMAP functions and cannot figure out how to do this. I can connect just fine to INBOX, list the headers, etc. but my target mails are a couple of directories further down. I'd like to somehow do the equivalent of chdir once i've made a connection. Does anyone know how i can achieve this? brian ---- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html ---- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html