How can I remove headers in JavaMail?

Dieter Wimberger

The MimeMessage has a method called
removeHeader(String name)
This will remove all headers with a given name.
Note that the folder the message is in will have to be opened READ_WRITE at the point of modification.
Probably you will want to make a copy and work on the copy
MimeMessage(MimeMessage source)

0 Comments  (click to add your comment)
Comment and Contribute






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



About | Sitemap | Contact