You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ri...@apache.org on 2008/06/27 19:16:18 UTC
svn commit: r672333 -
/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java
Author: rickmcguire
Date: Fri Jun 27 10:16:17 2008
New Revision: 672333
URL: http://svn.apache.org/viewvc?rev=672333&view=rev
Log:
GERONIMO-4167 MimeMesage.reply() is not setting the In-Reply-To and Responses headers in the reply message
Modified:
geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java
Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java?rev=672333&r1=672332&r2=672333&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java (original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java Fri Jun 27 10:16:17 2008
@@ -982,6 +982,25 @@
}
reply.setSubject(newSubject);
}
+
+ // if this message has a message ID, then add a In-Reply-To and References
+ // header to the reply message
+ String messageID = getSingleHeader("Message-ID");
+ if (messageID != null) {
+ // this one is just set unconditionally
+ reply.setHeader("In-Reply-To", messageID);
+ // we might already have a references header. If so, then add our message id
+ // on the the end
+ String references = getSingleHeader("References");
+ if (references == null) {
+ references = messageID;
+ }
+ else {
+ references = references + " " + messageID;
+ }
+ // and this is a replacement for whatever might be there.
+ reply.setHeader("References", MimeUtility.fold("References: ".length(), references));
+ }
Address[] toRecipients = getReplyTo();