dcsimg
Sending Attachment in RTF format
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, May 17, 2001 12:55 AM

Hi, I am trying to send a mail with the attachment in RTF format. For this is made a mutipart object, but the moment i set the content type to application/rtf, javamail raises an exception. Is there any other way to specify the rtf format. // Fill the message messageBodyPart.setText(""); multipart.addBodyPart(messageBodyPart); // This is for the attachment. messageBodyPart.setDataHandler(new DataHandler(fileLoaded.toString(), "application/rtf")); multipart.addBodyPart(messageBodyPart); // Put parts in message message.setContent(multipart); // Send the message Transport.send(message);    More>>

Hi,

I am trying to send a mail with the attachment in RTF format. For this is made a mutipart object, but the moment i set the content type to application/rtf, javamail raises an exception.
Is there any other way to specify the rtf format.

// Fill the message
messageBodyPart.setText("");
multipart.addBodyPart(messageBodyPart);
// This is for the attachment.
messageBodyPart.setDataHandler(new DataHandler(fileLoaded.toString(), "application/rtf"));
multipart.addBodyPart(messageBodyPart);
// Put parts in message
message.setContent(multipart);

// Send the message
Transport.send(message);

   <<Less

Re: Sending Attachment in RTF format

Posted By:   John_Zukowski  
Posted On:   Thursday, May 17, 2001 05:18 AM

Try not setting the content type.
About | Sitemap | Contact