How do I get the value of a specific header, delivered-to, and the list of all headers present?

Dieter Wimberger

The javax.mail.MimeMessage API doc shows you how to achieve this:

  1. String[] delto=msg.getHeader("delivered-to");
    The array will contain all present values as Strings.
  2. Enumeration enum=msg.getAllHeaders();
    The enumeration will contain all present headers as javax.mail.Header objects.
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact