MimeMessage problem

I have the following problem using MimeMessage:

Shipment a mail, and when it receipt appears to me in body of the message the following thing:

Mime-Version: 1.0

Content-Type: multipart/mixed; boundary="-=_Part_1_1956022.1156444224755"

MSG_ID: 0

=_Part_1_1956022.1156444224755

Content-Type: text/plain; charset=ISO-8859-1

Content-Transfer-Encoding: quoted-printable

It seems that part of the header is mixed with the body of the message.

The big problem here is that the header lines you see up are not recognized like header lines because are mixed with the body.

Could anybody help me?

[654 byte] By [Chachachara] at [2007-10-3 3:29:47]
# 1
I think you're confused. I think you don't understand the structureof multipart messages.
bshannona at 2007-7-14 21:23:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
could you be more specific? because iam reading the api and several examples and i dont see the the proble.Thanks
Chachachara at 2007-7-14 21:23:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
The example you showed looks perfectly fine.What do you think is wrong with it? The headersafter the MIME multipart boundary are perfectlynormal in a multipart message.
bshannona at 2007-7-14 21:23:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4

I understand what you said, but the thing is that te email client doesnt recognize the Mime-Version, Content-Type, etc like part of the header. I said this because when I inspect the header(using the "see full header" option in the email client) I see that From, return-Path, and others are recognize as part of the Internet header and the others not.

Chachachara at 2007-7-14 21:23:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
I don't understand.Which email client?What do you mean "not recognized"?How do you know whether the clientrecognizes the header or not?
bshannona at 2007-7-14 21:23:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6
Maybe if you posted the entire message that you think is causingproblems it would be easier for us to determine what the problem is.I don't see anything wrong with the excerpt that you posted.
bshannona at 2007-7-14 21:23:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 7

Email client Iam using tu recive the mail: yahoo and Outlook

In these two email clients you can hide or see the email header. When I set both

email clients to hide the headers the clients hide all except the Mime-Version, Content-Type,

Content-Transfer-Encoding...

So I understand that the email clients dont hide this things because it understand that they are not

part of the header of the message

Chachachara at 2007-7-14 21:23:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 8

Show me the entire message. If there's a blank line above these

headers, these headers will look like they're part of the body.

If you created the message with JavaMail (which I assume is why

you're posting here), make sure you didn't include a newline at the

end of the Subject string, for instance.

bshannona at 2007-7-14 21:23:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 9
Problem solved!!!Iwas taking the subject and the body from a database, and in the subject record i was including a new line..Many thanks
Chachachara at 2007-7-14 21:23:41 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...