Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Javamail messages

  1. #1
    Junior Member
    Join Date
    May 2013
    Thanked 0 Times in 0 Posts

    Default Javamail messages

    I need copy message between mailboxes(folders IMAP), only function is a copyMessages(Message[] msgs, Folder folder) but i have only 1 message

    off course i can :

    Message m = null;
    Message[] copMessages = null;

    copMessages = srcfolder.getMessages(m.getMessageNumber(),m.getMe ssageNumber());

    srcfolder.copyMessages(copMessages, dstfolder);

    but is not good solution, any idea ?

  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    My Mood
    Thanked 263 Times in 232 Posts

    Default Re: Javamail messages

    What is the problem with your posted solution?

Similar Threads

  1. Replies: 2
    Last Post: March 2nd, 2012, 09:45 AM
  2. JavaMail and Gmail
    By khushbu in forum Java Servlet
    Replies: 2
    Last Post: May 21st, 2010, 02:11 AM
  3. Problem with JavaMail... HELP! :(
    By danmcm88 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 18th, 2010, 05:11 PM
  4. Javamail attachment filenames
    By johniem in forum Java Theory & Questions
    Replies: 0
    Last Post: February 3rd, 2010, 07:51 AM
  5. Javamail
    By johniem in forum Java Theory & Questions
    Replies: 1
    Last Post: February 3rd, 2010, 07:42 AM