Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javamail rename folder

 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to rename a folder using java mail api but unable to do so.

Below is the pseudo code



Its always returning false, failing to rename the folder.

Please tell me what wrong I am doing here and how to make it work.

We are currently using javamail-1.2ea2 version.

Thanks,
Rawat
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For starters, use a recent version of JavaMail. Yours is more than 10 years old.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the underlying OS allow renaming?

WP
 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. I will try with upgraded version of JavaMail.

OS allows everything if permissions are there.

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't think that OS permissions have much to do with renaming a mail directory. Could be, I guess, but a mail server based on file system storage creates, renames and deletes files all the time, so it needs those permissions to function.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, we don't know from the OP if this is a stand-alone Java application, or a web-application.

If web then the server runs under an account, which may be passed to the IMAP server.

Returning "false" indicates that the rename failed, and it looks like no other data is available.

If this is M$ Exchange, may be possible to look at the logs or events on the host.

WP
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic