cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with accessing body of digitally signed .eml-file

Former Member
0 Kudos

Hi!

I' m facing a problem with accessing the message-body of a .eml-file which I' m reading as a FileInputStream:

Message message = new MimeMessage(null, new FileInputStream("email.eml"));

I can perfectly loop over the Header-Enumeration read with

message.getAllHeaders()

but if I' m trying to access the Messages body via

Object o = message.getContent()

the returned Object is neither of type Multipart nor Part, but an instance of com.sun.mail.util.QPDecoderStream.

The mail was digitally signed (Content-Type "smime.p7m"), so that' s probably the reason this behaviour.

Could anybody tell me how I get access to the Mail-Body and -Attachments (Multipart Mime) and - if possible - how I can transform the Message into an SMime-type which I then could extract the Signature from.

Regards,

Thomas

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

solved on my own.