• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Javamail rename folder

 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For starters, use a recent version of JavaMail. Yours is more than 10 years old.
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the underlying OS allow renaming?

WP
 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic