How can I decode Headers?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abhi_Naaz
Posted On:   Thursday, July 7, 2005 12:18 AM

Hi, I need to get the header values in decoded form(e.g X-Apparently-to:="xyz@abc.com") in my javamail program, for that I am using this part of code String head =""; String str=""; headers = msg[i].getAllHeaders(); while(headers.hasMoreElements()) { try{ str = headers.nextElement().toString(); head = MimeUtility.decodeText(str); System.out.println(head.toString()); } catch(Exception e){} } But It gives output values something like javax.mail.Header@b307f0 javax.mail.Header@cf66b. .    More>>

Hi,

I need to get the header values in decoded form(e.g X-Apparently-to:="xyz@abc.com")
in my javamail program, for that I am using this part of code

String head ="";

String str="";

headers = msg[i].getAllHeaders();

while(headers.hasMoreElements())

{

try{

str = headers.nextElement().toString();

head = MimeUtility.decodeText(str);

System.out.println(head.toString());

}

catch(Exception e){}

}



But It gives output values something like

javax.mail.Header@b307f0

javax.mail.Header@cf66b.

.


.

.
How can I decode these values.Please help.

Thanks in advance

   <<Less
About | Sitemap | Contact