What's the best way to use the default mail folder path (eg. ~/netscape/mail) with the IMAP functions?
The INBOX is always in the home dir but the other folders (sent, trash, drafts etc) are kept in ~netscape/mail.
So far I've been looping over ALL folders then using a regexp to filter out the ones to use but this is extremely slow since the home dir cotains many many folders and files so the loop takes ages to complete every time the page is accessed. This is obviously not going to be acceptable when the application is put to public use.
I cannot afford to simply link to default folders such as trash, sent etc since I need to be able to access folders created by the user too.
Can one of the functions be manipulated in such a way? (Bear in mind the inbox is in the home dir (and there is an empty folder called inbox ~/netscape/mail)
Thanks for any help