How to integrate permanent headers with JavaMail
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Christian_Neuroth
Posted On:   Friday, March 28, 2003 02:45 AM

Hi forum!

I am new to JavaMail... It seems to be very easy to include headers in messages. I want to include headers that will also be included in forwardings and answers to the original message....

Is this possible? How can I achieve this?

Cheers & thanxxs

Christian

Re: How to integrate permanent headers with JavaMail

Posted By:   Christopher_Koenigsberg  
Posted On:   Friday, March 28, 2003 06:51 AM

Not that I know of. I think you need to study how Internet mail works, not just what calls are available to you in the JavaMail API.



If you are lucky, when someone forwards (all or parts of the body text of) your message, they might include most, or all, of your original headers too, perhaps with your lines possibly reformatted, rebroken, rewrapped differently, and indented and prefixed e.g. with ">". The best case would be where your entire original message is attached as a body part of MIME content-type "text/rfc822".



If you are lucky, when someone replies to your message, they might include all or part of your original body text (also maybe with your lines rebroken/rewrapped, indented and prefixed), and they might include some of your headers. Again the best case would be where your entire original message might be attached as a "text/rfc822" body part.



Also in replies or forwards, depending on the mail client generating the new message, there might even be a header (something like "In-Reply-To", "References" etc.) indicating the original Message-ID of your message, for building conversational topic threads. But someone with a more flexible mail client application could easily forward, and reply to, your message, without any of your original headers coming along in the new message.



It IS possible with some more flexible mail clients (and supported by standards) to do a "Re-send", instead of a "forward". In this case, all your original headers ARE preserved, and new ones are added, e.g. "Resent-To:", "Resent-From:", "Resent-Date", "Resent-MessageID:" are added, plus a new set of "Received" of course.

About | Sitemap | Contact