I have tried to find a solution to this with any luck, so i decided to post it here.
The problem is, when i send a message with javaMail, it automatically generates a Message-Id (The one i store into my database to then identify replies to this message) but it is being changed for some reason by the smpt server when the message is sent so i wont be able to trace any related to this message.
For example
I first send a message via gmail to one of the accounts sycronized with my mail client, then i check the message with my message client and everything is ok the Message-Id is
<CAPDSfCN1qPAhBCRmFK-zwP=MM=KjgpYuvhVRFAPwz1PjOqtnFA@mail.gmail.com>
Then i send a reply for this message via my message client, the id generated by javaMail is
<1907960987.0.1322086080735.JavaMail.root@smtp.live.com>
Finally, when i go to check the reply in my email account it has the following values in its headers
Message-ID: <BLU0-SMTP33091BE2B32A7F46E370665C2C90@phx.gbl>
FAIL
In-Reply-To: <CAPDSfCN1qPAhBCRmFK-zwP=MM=KjgpYuvhVRFAPwz1PjOqtnFA@mail.gmail.com>
OK
As you see, the Message-Id is changed, i was expecting it to be
<1907960987.0.1322086080735.JavaMail.root@smtp.live.com>
Why is this happening?
I appreciate any help
Thank you all
--Edit
According to sugestions i made a test using smtpsend demo from javaMail (I implemented a subclass of MimeMessage to generate my own Message-Id).
java -jar -Dmail.smtp.starttls.enable=true -Dmail.smtp.port=587 SMTPSend.jar -d -M smtp.live.com -U myaccount@hotmail.com -P mypass -o myaccount@hotmail.com -A anotheraccount@gmail.com
Between smtpsend output when message was sent, there was the Message-Id generated
<60eea6ae-2657-41bd-b475-3a57eff885ac@mydomain.com>
But then, when i went to check this message on anotheraccount@gmail.com, the Message-Id was different
<BLU0-SMTP109215E6BB99B93FC106B1E88B00@phx.gbl>
Why is it changing my Message-Id on the fly... i dont get it
--Edit 2
I noticed that the problem is now happening just when i send mails from a hotmail account message-id is not changing anymore when i send mails from a gmail account (i think that implementing my own Message-Id generation method helped to solve that)
Thanks for replying