class MimeMessageModifier {

    public void replaceSubject(Optional<String> newSubject) throws MessagingException {
        if (newSubject.isPresent()) {
            message.setSubject(null);
            message.setSubject(newSubject.get(), StandardCharsets.UTF_8.displayName());
        }
    }

    public  MimeMessageModifier(MimeMessage message);

}