How do I set/get the priority of a message?

John Zukowski

To set the header, you need to add an "X-Priority" header:


MimeMessage msg;
...
msg.addHeader("X-Priority", "1");
To get the header, just ask for the header. Do notice that you get an array back.

MimeMessage msg;
...
String priority[] = msg.getHeader
  ("X-Priority");
You can also ask with String getHeader(String name, String delimiter) if you want to treat them as a delimited list.
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


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

 

 

About | Sitemap | Contact