How to set a MimeBodyPart with a MimeMessage
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   amit_mendelson
Posted On:   Tuesday, June 26, 2001 08:16 AM

I want to create a MimeBodyPart whose content is a MimeMessage (according to rfc 1894 - creation of delivery status notifications). However, every trial of the next forms fails. (It compiles without errors, but when I try to print the message with its writeTo() method, it throws an IO exception: no content).
What is the correct syntax here?
I tried the next forms (don't work)
MimeBodyPart m = new MimeBodyPart(msg.getInputStream());
or
MimeBodyPart m = newMimeBodyPart;
m.setContent(msg.getContent(),"message/rfc822")

About | Sitemap | Contact