Java Sequence/Segment Question

Posted on 2006-03-28
Last Modified: 2010-03-31

I have a quick Java sequence # segment # number type of question.  I am trying to figure out the best way to do this...  I have a common mailbox that I want to empty and that mail messages that are in the mailbox are for different people (say A, B, C, and so on).  The mail messages may be large and separated in segments with segment numbers (say C1, C2, C3, and so on).  Can someone suggest a good way to tackle this?  I'll need to put the segments together too before I send them along

I'll be pulling the mail messages one at a time from the mailbox.


Question by:ryno71
    LVL 30

    Expert Comment

    >> The mail messages may be large and separated in segments with segment numbers

    What do you want the logic of separation to be? Should it be from sender, subject, size of the mail, date delivered or something else?

    Author Comment


    Actually the separation of the mail messages should be based on the recipient because there is only one mailbox and many recipients.

    LVL 30

    Accepted Solution

    Oh, well. You need to write an SMTP listener which can listen for mail-messages on the SMTP server. Once the e-mail arrives, it will be notified. Then it can check the to-address of the e-mail using which you can serialize the mail into files, in different directories (created as per the user-name).

    This need not be done in Java. For example, if the server is a Microsoft exchange-server, you will find it a lot easier to do it through the CDO API in C# .NET.
    LVL 30

    Expert Comment

    Any specific reason for the B grade? You can ask for more clarification if you want.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now