Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaMail 1.3 Unable to acces the shared mailbox through IMAP

 
Amit Siinngghh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
carlos sanchez
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic