I am implementing one project using javamail.I need to access headers of email. My problem is when I am using the getHeader method it returns me the Object value(I guess),e.g. I get result in this form: (Ljava.lang.String;@f0c0d3) but I need to get the result in readable form like for "X-Mail-from" header I should see: firstname.lastname@example.org, i.e. some email address.So how to convert that result. please help me.