File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes I have a trouble to read a content of MIME message Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "I have a trouble to read a content of MIME message" Watch "I have a trouble to read a content of MIME message" New topic
Author

I have a trouble to read a content of MIME message

Ta lion
Greenhorn

Joined: Nov 30, 2011
Posts: 3
here my code :
import java.io.IOException;
import java.util.Properties;

import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.internet.MimeMessage;
import javax.servlet.http.*;

public class MailHandlerServlet extends HttpServlet {
/**
*
*/
private static final long serialVersionUID = 5548406084688550825L;

public void doPost(HttpServletRequest req,
HttpServletResponse resp)
throws IOException {
Properties props = new Properties();
Session session = Session.getDefaultInstance(props, null);
try {
MimeMessage message = new MimeMessage(session, req.getInputStream());

} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

can anybody tell me how can i parse this message to String and read a content of this?
thank all
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: I have a trouble to read a content of MIME message
 
Similar Threads
javax.mail problem with "cc" option.
Any one can help me to find out problem to send SMS?
smtp username/password for JavaMail
Automatic sending of email
SocketException with JavaMail