This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes JavaMail 1.3 Unable to acces the shared mailbox through IMAP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JavaMail 1.3 Unable to acces the shared mailbox through IMAP" Watch "JavaMail 1.3 Unable to acces the shared mailbox through IMAP" New topic

JavaMail 1.3 Unable to acces the shared mailbox through IMAP

Amit Siinngghh

Joined: Jun 19, 2004
Posts: 12
I am unable to access the Shared Mailbox through JavaMail1.3 api.

The scenario is:

My email account is given access to the shared mailbox on the exchange server. I am using JavaMail 1.3 api to access the emails in my personal mailbox (I can sucessfully read the messages and attachments in my personal mailbox). However when I try to get the folder list from the IMAPStore then no folders are returned.

I am using

Also here is a transcript of the messages recieved from the exchange server

DEBUG: setDebug: JavaMail version 1.3.1
DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
* OK Microsoft Exchange 2000 IMAP4rev1 server version 6.0.6603.0 (imap server where email mailbox is present) ready.
A0 OK CAPABILITY completed.
A1 LOGIN "someUSER" somePWD
A1 OK LOGIN completed.
* NAMESPACE (("" "/")) NIL NIL
A2 OK NAMESPACE completed.
A3 LIST "" +ridata
A3 OK LIST completed.

I dont have a clue of what is wrong with it. According to me I should have got the list of shared folders which I am subscribed to.

Does any one out there has any suggestion.

Thanks in advance
carlos sanchez
Ranch Hand

Joined: Jan 29, 2003
Posts: 45
Hi, I've got the same problem. the Store method returns a Folder[0] by default, the method is abstract so you (we) should implement it. I haven't checked the IMAPStore yet.

I've also found what's suposed to be a bug in the exchange server (thanks to the people in the javamail-list).

I'll keep on looking. Be sure to post if you find out something.

Don't ever let your computer know you're in a hurry! :nono:
carlos sanchez
Ranch Hand

Joined: Jan 29, 2003
Posts: 45
this is the code 4 getUserNamespaces in IMAPStore

* Using the IMAP NAMESPACE command (RFC 2342), return a set
* of folders representing the User's namespaces.
public Folder[] getUserNamespaces(String user)
throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.otherUsers == null)
return super.getUserNamespaces(user);
return namespaceToFolders(ns.otherUsers, user);
hui man

Joined: Dec 17, 2004
Posts: 3
Hello, I have same problem.

store = session.getStore(mailProvider);
store.connect(mailServer, mailUsername, mailPassword);
Folder [] sharedFolders = store.getSharedNamespaces();
Folder [] abcfolder = sharedFolders[0].list();

sharedFolders[0] is "Public Folders/". abcfolder is empty. However, it should contain lots of subfolders. I want to know the way to check shared public folders. Could anyone help?
I agree. Here's the link:
subject: JavaMail 1.3 Unable to acces the shared mailbox through IMAP
Similar Threads
Garbage collection query
Errors in Devkas SCJP Exam question 23 of 72 (in assessment)
Garbage collection...
javamail,No login methods supported exception
pop3 works, imap fails with No login methods supported!