Advertisement

04.16.2008 at 08:12AM PDT, ID: 23327446
[x]
Attachment Details

Jmail reading popserver mail content  issues

Asked by vkchaitu82 in JavaMail

Tags: Jmail

I am able to connect to the pop server and check for all the new emails, get the subject of the email, time of the email. But when I am trying to read the content of the email it is not working,it is giving an exception.

Can any one guide me in this regard how to retrive the content of the email body.

snap of code:

           for(int i = 1; i <=msgCount; i++) {
               Message m1 = folder.getMessage(i);
             
                // Get some headers
                Date date = m1.getSentDate();
                Address [] from = m1.getFrom();
                String subj = m1.getSubject();
                String mimeType = m1.getContentType();
               out.println("This is the mail oon "+date + "\t" + from[0] +"of vk"+subj );
//read the data
              Object o = m1.getContent();
                if (o instanceof String) {
                   out.println("**This is a String Message**");
                   out.println((String)o);
                }
Start Free Trial
[+][-]04.18.2008 at 08:36AM PDT, ID: 21386755

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.18.2008 at 01:40PM PDT, ID: 21389473

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.22.2008 at 07:23AM PDT, ID: 21411364

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2008 at 01:09PM PDT, ID: 21415054

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.22.2008 at 01:15PM PDT, ID: 21415114

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2008 at 01:39PM PDT, ID: 21415355

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 02:26AM PDT, ID: 21418798

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaMail
Tags: Jmail
Sign Up Now!
Solution Provided By: girionis
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628