File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
Author

JavaMail 1.3 Unable to acces the shared mailbox through IMAP

Amit Siinngghh
Greenhorn

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 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 IDLE LOGIN-REFERRALS MAILBOX-REFERRALS NAMESPACE LITERAL+ UIDPLUS CHILDREN AUTH=NTLM
A0 OK CAPABILITY completed.
A1 LOGIN "someUSER" somePWD
A1 OK LOGIN completed.
A2 NAMESPACE
* 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
Amit
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).

http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b311468

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
Greenhorn

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: http://aspose.com/file-tools
 
subject: JavaMail 1.3 Unable to acces the shared mailbox through IMAP