if (sent == null) { removeHeader("Date"); } else { setHeader("Date", dateFormat.format(sent)); }
setOrRemoveHeader("Date", dateFormat.format(sent));
    public void setSentDate(Date sent) throws MessagingException {        if (sent == null) {            removeHeader("Date");        } else {            setHeader("Date", dateFormat.format(sent));        }    }