Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I have a trouble to read a content of MIME message

Ta lion
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here my code :
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

can anybody tell me how can i parse this message to String and read a content of this?
thank all
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic