boundary problem in mimetype text/xml
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Thothathri_Sarathy
Posted On:   Thursday, July 26, 2001 02:06 PM

I implemented datacontenthandler, and used that for sending a mail with content type = text/xml. Things work fine. When i try to do the same in a multipart message, the mail is going out, but the problem is it does not write out any boundary between body parts. So when I look at the message in a mail reader, it has no body. when I try to read the mail body parts thru a program, it throws missingboundaryexception. Is there any way I can tell the javamail api to write out the boundary or is there any other solution for this. Below is my writeTo method in the DataContentHandler Implementation public void writeTo( java.lang.Object dataSource,    More>>
			
I implemented datacontenthandler, and used that for
sending a mail with content type = text/xml. Things
work fine.
When i try to do the same in a multipart message,
the mail is going out, but the problem is it does
not write out any boundary between body parts. So
when I look at the message in a mail reader, it has
no body. when I try to read the mail body parts
thru a program, it throws missingboundaryexception.

Is there any way I can tell the javamail api to write out
the boundary or is there any other solution for this.
Below is my writeTo method in the DataContentHandler
Implementation

public void writeTo( java.lang.Object dataSource,
java.lang.String mimeType,
java.io.OutputStream outputStream)
throws java.io.IOException {
if ( mimeType.equals ( "text/xml" ) || mimeType.equals ( "mytype/mysubtype" ) ){
byte b[] = ((String)dataSource).getBytes();
outputStream.write( b );
}
}

   <<Less
About | Sitemap | Contact