Problem reading mails from rediff or yahoo
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Saturday, May 10, 2003 06:25 AM

void MessageText(int messageno) throws Exception { Message message = currentFolder.getMessage(messageno); currentMessage=message; System.out.println("c"+ currentMessage); //text=currentMessage.getContentType(); //System.out.println("c"+ text); if(currentMessage.isMimeType("text/*")) { text=(String)currentMessage.getContent(); System.out.println("content _______ "+text); System.out.println("single"); } else if(currentMessage.isMimeType("multipart/*"))    More>>

void MessageText(int messageno) throws Exception


{



Message message = currentFolder.getMessage(messageno);



currentMessage=message;


System.out.println("c"+ currentMessage);



//text=currentMessage.getContentType();


//System.out.println("c"+ text);




if(currentMessage.isMimeType("text/*"))


{



text=(String)currentMessage.getContent();




System.out.println("content _______ "+text);


System.out.println("single");



}



else if(currentMessage.isMimeType("multipart/*"))


{


Part part;




Multipart multipart=(Multipart)currentMessage.getContent();



int bodyCount=multipart.getCount();




parturl=new String[bodyCount];


parturldetails=new String[bodyCount];



System.out.println("bodyCount"+bodyCount);



BodyPart mbp=multipart.getBodyPart(0);



if(mbp.isMimeType("text/*"))


{


text=(String)mbp.getContent();


System.out.println("multi");


}



// here i extract the other parts.......



for(int i=0;i


{


part=multipart.getBodyPart(i);



parturldetails[i]=part.getFileName();


parturl[i]=String.valueOf(i);



}



}



}





////


but when i get message from rediff or account ... this programe does work...



sometimes i get this



UnsupportedEncodingException: iso-8859-1;





plz help me out

.

   <<Less
About | Sitemap | Contact