List of usage examples for javax.mail.internet MimePart removeHeader
public void removeHeader(String header_name) throws MessagingException;
From source file:com.zimbra.cs.mime.Mime.java
public static void repairTransferEncoding(MimePart mp) throws MessagingException { if (isZimbraJavaMailShim(mp)) { return;//from www. j a v a 2 s .co m } String cte = mp.getHeader("Content-Transfer-Encoding", null); String ct = getContentType(mp); if (cte != null && (!TRANSFER_ENCODINGS.contains(cte.toLowerCase().trim()) || ct.startsWith(MimeConstants.CT_MULTIPART_PREFIX) || ct.equals(MimeConstants.CT_MESSAGE_RFC822))) mp.removeHeader("Content-Transfer-Encoding"); }