Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8069245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:57:40+00:00 2026-06-05T12:57:40+00:00

I am trying to save a whole mailbox onto disk using the JavaMail API

  • 0

I am trying to save a whole mailbox onto disk using the JavaMail API (in essence, perform a full backup_. I can successfully read all the relevant folders into memory and then sever the connection to my mail server. What I can’t figure out is how to actually store the folders and/or individual messages if need be on my disk.

I’ve tried searching around and came up with an interesting link (below) but can’t figure this out. Does anyone have any advice on where to get started? I appreciate it, thanks

http://www.oracle.com/technetwork/java/javamail/faq/index.html#serialize

quick note: I tried using a class that contained an ArrayList of type Folder(JavaMail class) and make that serializable, but I still had an exception thrown when I tried to write to disk. I’ve been working on this problem for about two days now and I could use some pointers. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T12:57:42+00:00Added an answer on June 5, 2026 at 12:57 pm

    You found the FAQ, but you missed this entry:

    • How do I store mail messages on my local disk?

    And, as the FAQ entry you found says, you can’t just serialize the Message objects, let alone the Folder objects.

    If all this seems too complicated for you, the simplest approach might be to get an IMAP server that you run on your local machine, then copy the messages from your remote IMAP server to your local IMAP server. The JavaMail FAQ has pointers to IMAP servers you can install locally, and a little web searching will turn up more. JavaMail also comes with a demo program (populate.java) for copying folders.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to save the database using boost serialization, I encounter the segfault that
I'm trying to save a CUploadedFile object in local folder, I am using img
I am trying to save a simple template to pdf using the rendering plugin,
I am trying to save multiple image using this code. But instead its saving
I am trying to locate a message which I can override and then save
I am trying to save a WriteableBitmap to local in Silverlight using SaveFileDialog .
Okay trying to construct a single query to save myself a whole bunch of
I'm trying to save email attachment from Google mail account. AFAIK, it can be
I'm taking a picture using my own camera and trying to save the result
I'm taking a picture using my own camera and trying to save the result

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.