if (mp.getFileName() != null) cd.setParameter("filename", mp.getFileName());
String filename = Mime.getFilename(mp); if (filename != null) cd.setParameter("filename", filename);
    private static void attachPart(Multipart mmp, com.zimbra.cs.mailbox.Message message, String part)    throws IOException, MessagingException, ServiceException {        MimePart mp = ContentServlet.getMimePart(message, part);        if (mp == null)            throw MailServiceException.NO_SUCH_PART(part);        MimeBodyPart mbp = new MimeBodyPart();        mbp.setDataHandler(new DataHandler(new MimePartDataSource(mp)));        String type = mp.getContentType();        mbp.setHeader("Content-Type", type == null ? Mime.CT_APPLICATION_OCTET_STREAM : type);        ContentDisposition cd = new ContentDisposition(Part.ATTACHMENT);        if (mp.getFileName() != null)            cd.setParameter("filename", mp.getFileName());        mbp.setHeader("Content-Disposition", cd.toString());        String desc = mp.getDescription();        if (desc != null)            mbp.setHeader("Content-Description", desc);        mmp.addBodyPart(mbp);    }