Major problem with imap_list() ? [SOLVED]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Major problem with imap_list() ? [SOLVED]

Post by Chris Corbyn »

Hi,

I've just run imap_list() on a university imap account and I've noticed something bad.

Because the account is on a network drive (the user's home drive) all the user's files and documents are listed as mailboxes.

Can I get around this by using an alternative function or any other method?

I do not want to limit the results to Inbox, Sent, Drafts, Junk and Trash since the user may have created some new folders which I would also like to be displayed.

Thnaks :-)
Last edited by Chris Corbyn on Fri Dec 31, 2004 3:09 am, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

have them set a root mail path, so you only list stuff under that folder?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Hmmm... I remember this. The university actually make you choose it from a drop box when logging in to their webmail system.

So if the server is imaphost-ug.dur.ac.uk and the default mail path is ~/netscape/mail.

How do I write the connection in imap_open()? I've been trying but can't get it to work.

Also, it appears that the inbox is still in the home dir (it is only sent, trash, junk, drafts and any personal folders in the ~/netscape/mail folder).

Here's the way I've tried putting it:

Code: Select all

imap_open("{imaphost-ug.dur.ac.uk/imap/~/netscape/mail:143}","xxx","xxx");
Is this all wrong?

EDIT:: DUH... Just my bad!

Code: Select all

imap_open("imaphost-ug.dur.ac.uk/imap:143}netscape/mail/".$folder,"xxx","xxx");
Post Reply