Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Removing Content-Type, Content-Transfer-Encoding headers

user5646832Oct 18 2016 — edited Oct 20 2016

Hi, can you explain why this code:

// Create the body part

MimeBodyPart messageBodyPart = new MimeBodyPart();

messageBodyPart.removeHeader("Content-Transfer-Encoding");

messageBodyPart.removeHeader("Content-Type");

// The body text

messageBodyPart.setText("This is message body");

...

though the headers are removed, it generates this type of source e-mail?

------=_Part_0_2093176254.1476815278040

Content-Transfer-Encoding: 7bit

Content-Type: text/plain; charset=us-ascii

This is message body

------=_Part_0_2093176254.1476815278040--

I would like to remove these headers

Many thanks.

JavaMail version 1.5.6

This post has been answered by Bill Shannon-Oracle on Oct 19 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2016
Added on Oct 18 2016
4 comments
3,503 views