Closed
Description
Hi,
I am trying access S/MIME properties from a signed email (not encrypted, only signed). This works beautifully when I pass the email as 'eml' but when I am converting it from 'msg' format most of the properties are empty and smimeMode remains 'PLAIN'.
Here is the relevant code:
InputStream outlookMessageStream = new FileInputStream("src/main/resources/smime_test_1.msg");
Email outlookMessage = EmailConverter.outlookMsgToEmail(outlookMessageStream);
OriginalSmimeDetails details = outlookMessage.getOriginalSmimeDetails();
logger.info("outlookMessage.getSmimeMode {}",details.getSmimeMode()); // PLAIN
logger.info("outlookMessage.getSmimeMime {}",details.getSmimeMime()); // null
logger.info("outlookMessage.getSmimeType {}",details.getSmimeType()); // null
logger.info("outlookMessage.getSmimeName {}",details.getSmimeName()); // null
logger.info("outlookMessage.getSmimeMicalg {}",details.getSmimeMicalg()); // null
InputStream emlMessageStream = new FileInputStream("src/main/resources/smime_test_1.eml");
Email emlMessage = EmailConverter.emlToEmail(emlMessageStream);
details = emlMessage.getOriginalSmimeDetails();
logger.info("emlMessage.getSmimeMode {}",details.getSmimeMode()); // SIGNED
logger.info("emlMessage.getSmimeMime {}",details.getSmimeMime()); // multipart/signed
logger.info("emlMessage.getSmimeType {}",details.getSmimeType()); // null
logger.info("emlMessage.getSmimeName {}",details.getSmimeName()); // null
logger.info("emlMessage.getSmimeMicalg {}",details.getSmimeMicalg()); // sha-512
For this example I am using the same email, exported in different formats and v7.0.0 of simple-java-mail.
Is there any way to access S/MIME properties from a msg-file?
Thanks