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 752517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:47:26+00:00 2026-05-14T14:47:26+00:00

I am using a small java smtp library ( http://code.google.com/p/subethasmtp/ ), by this I

  • 0

I am using a small java smtp library (http://code.google.com/p/subethasmtp/), by this I need to parse the incoming emails in separate components viz body, attachments etc.

I am trying to use mime4j , but the documentation suggests that mime4j can only give event notification or token notification and nothing else. For stripping out body and attachments etc I had to use my own custom logic inside the event handlers. Is my observation correct?

If yes then how can I use mime4j to use for my requirement. Please suggest.

I badly need an approach that takes in the smtp data stream and returns me with an array of attachment references or streams in fully parsed out form in java. Please help.

Thanks in advance

Ashish Sharma

  • 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-05-14T14:47:26+00:00Added an answer on May 14, 2026 at 2:47 pm

    Mime4j can definitely do what you need. Make a subclass of org.apache.james.mime4j.message.SimpleContentHandler, and implement the bodyDecoded method. Then pass this subclass into a MimeStreamParser instance. You’ll see that bodyDecoded is called once per body or attachment, and the stream it gives you contains the data with Base64 or Quoted-Printable decoding already performed.

    If you don’t like event-based APIs in general, you can try the more DOM-like functionality exposed via the org.apache.james.mime4j.message.Message class. You can call Message.getBody() and then see if what it gives you back is an instance of Multipart, TextBody, BinaryBody, etc. If Multipart, then you can call Multipart.getBodyParts to recurse into the subparts.

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

Sidebar

Ask A Question

Stats

  • Questions 506k
  • Answers 506k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try this: $("div.evenprop .locid").each(function() { $("#" + this.innerHTML).html($(this).parent().clone()); }); You… May 16, 2026 at 3:44 pm
  • Editorial Team
    Editorial Team added an answer For this you can use an eval-parse construct, but again… May 16, 2026 at 3:44 pm
  • Editorial Team
    Editorial Team added an answer Try using the zoomToRect method. May 16, 2026 at 3:44 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm interested in writing a small Java application using SWT. I'm a blind individual
In a small java swing 2D game, what is the best solution for creating
I recently inherited a small Java program that takes information from a large database,
I have a small Java test app in Netbeans where the main() class reads
I've got a small Java program that I'm developing for a project, which pulls
I am trying to write a small java program that will accept a file
I'm working on a small java application that needs to load/save configuration properties. At
I am using small plugin to jquery: jquery-plugin-autoresize But i have trouble with using
I have written a small program using Borland's C++ builder, and along the way,
I am trying to create an HTML GUI for an application using Qt's WebKit...

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.