Index: mail/base/content/mailCommands.js =================================================================== RCS file: /cvsroot/mozilla/mail/base/content/mailCommands.js,v retrieving revision 1.25 diff -u -p -r1.25 mailCommands.js --- mail/base/content/mailCommands.js 26 Jan 2006 23:48:13 -0000 1.25 +++ mail/base/content/mailCommands.js 6 Apr 2006 02:26:56 -0000 @@ -258,7 +258,10 @@ function ComposeMessage(type, format, fo var messageIDScheme = messageID ? messageID.split(":")[0] : ""; if (messageIDScheme && (messageIDScheme == 'http' || messageIDScheme == 'https') && "openComposeWindowForRSSArticle" in this) openComposeWindowForRSSArticle(messageID, hdr, type); - else if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline || + else if (type == msgComposeType.Reply || + type == msgComposeType.ReplyAll || + type == msgComposeType.ReplyToList || + type == msgComposeType.ForwardInline || type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender || type == msgComposeType.ReplyToSenderAndGroup || type == msgComposeType.Template || type == msgComposeType.Draft) Index: mailnews/base/resources/content/mailCommands.js =================================================================== RCS file: /cvsroot/mozilla/mailnews/base/resources/content/mailCommands.js,v retrieving revision 1.100 diff -u -p -r1.100 mailCommands.js --- mailnews/base/resources/content/mailCommands.js 20 Oct 2005 16:03:26 -0000 1.100 +++ mailnews/base/resources/content/mailCommands.js 6 Apr 2006 02:26:57 -0000 @@ -267,7 +267,9 @@ function ComposeMessage(type, format, fo } } - if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline || + if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || + type == msgComposeType.ReplyToList || + type == msgComposeType.ForwardInline || type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender || type == msgComposeType.ReplyToSenderAndGroup || type == msgComposeType.Template || type == msgComposeType.Draft) Index: mailnews/compose/public/nsIMsgComposeParams.idl =================================================================== RCS file: /cvsroot/mozilla/mailnews/compose/public/nsIMsgComposeParams.idl,v retrieving revision 1.8 diff -u -p -r1.8 nsIMsgComposeParams.idl --- mailnews/compose/public/nsIMsgComposeParams.idl 16 Sep 2005 15:18:32 -0000 1.8 +++ mailnews/compose/public/nsIMsgComposeParams.idl 6 Apr 2006 02:26:57 -0000 @@ -59,6 +59,7 @@ interface nsIMsgCompType { const long Template = 10; const long MailToUrl = 11; const long ReplyWithTemplate = 12; + const long ReplyToList = 13; }; Index: mailnews/compose/src/nsMsgCompose.cpp =================================================================== RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v retrieving revision 1.481 diff -u -p -r1.481 nsMsgCompose.cpp --- mailnews/compose/src/nsMsgCompose.cpp 3 Feb 2006 14:18:18 -0000 1.481 +++ mailnews/compose/src/nsMsgCompose.cpp 6 Apr 2006 02:26:58 -0000 @@ -1751,6 +1751,7 @@ nsresult nsMsgCompose::CreateMessage(con default: break; case nsIMsgCompType::Reply : case nsIMsgCompType::ReplyAll: + case nsIMsgCompType::ReplyToList: case nsIMsgCompType::ReplyToGroup: case nsIMsgCompType::ReplyToSender: case nsIMsgCompType::ReplyToSenderAndGroup: @@ -2196,8 +2197,13 @@ NS_IMETHODIMP QuotingOutputStreamListene if (!mCiteReference.IsEmpty()) compose->SetCiteReference(mCiteReference); - if (mHeaders && (type == nsIMsgCompType::Reply || type == nsIMsgCompType::ReplyAll || type == nsIMsgCompType::ReplyToSender || - type == nsIMsgCompType::ReplyToGroup || type == nsIMsgCompType::ReplyToSenderAndGroup) && mQuoteOriginal) + if (mHeaders && (type == nsIMsgCompType::Reply || + type == nsIMsgCompType::ReplyAll || + type == nsIMsgCompType::ReplyToList || + type == nsIMsgCompType::ReplyToSender || + type == nsIMsgCompType::ReplyToGroup || + type == nsIMsgCompType::ReplyToSenderAndGroup) && + mQuoteOriginal) { nsCOMPtr compFields; compose->GetCompFields(getter_AddRefs(compFields)); @@ -2213,6 +2219,7 @@ NS_IMETHODIMP QuotingOutputStreamListene nsAutoString followUpTo; nsAutoString messageId; nsAutoString references; + nsAutoString listPost; nsXPIDLCString outCString; PRBool needToRemoveDup = PR_FALSE; if (!mMimeConverter) @@ -2257,6 +2264,29 @@ NS_IMETHODIMP QuotingOutputStreamListene needToRemoveDup = PR_TRUE; } + + mHeaders->ExtractHeader(HEADER_LIST_POST, PR_TRUE, getter_Copies(outCString)); + if (!outCString.IsEmpty()) + mMimeConverter->DecodeMimeHeader(outCString, listPost, charset); + + if (type == nsIMsgCompType::ReplyToList && ! listPost.IsEmpty()) + { + nsString::const_iterator mailtoStart, mailtoEnd; + listPost.BeginReading(mailtoStart); + listPost.EndReading(mailtoEnd); + nsAutoString mailtoText(NS_LITERAL_STRING("" + if (mailtoFound && listPost.Equals(mailtoStart.get()) && + listPost.RFindChar('>') == listPost.Length() - 1) + { + listPost.Cut(0, mailtoText.Length()); + listPost.Cut(listPost.Length() - 1, 1); + + compFields->SetTo(listPost); + } + } mHeaders->ExtractHeader(HEADER_REPLY_TO, PR_FALSE, getter_Copies(outCString)); if (outCString) @@ -2294,7 +2324,8 @@ NS_IMETHODIMP QuotingOutputStreamListene mMimeConverter->DecodeMimeHeader(outCString, references, charset); } - if (! ((type == nsIMsgCompType::ReplyAll) && ! mailFollowupTo.IsEmpty())) + if (! ((type == nsIMsgCompType::ReplyAll) && ! mailFollowupTo.IsEmpty()) && + ! ((type == nsIMsgCompType::ReplyToList) && ! listPost.IsEmpty())) { if (! mailReplyTo.IsEmpty()) { // handle Mail-Reply-To (http://cr.yp.to/proto/replyto.html) @@ -2796,6 +2827,7 @@ NS_IMETHODIMP nsMsgCompose::RememberQueu // the header that we then look at when we actually send the message. if (mType == nsIMsgCompType::Reply || mType == nsIMsgCompType::ReplyAll || + mType == nsIMsgCompType::ReplyToList || mType == nsIMsgCompType::ReplyToGroup || mType == nsIMsgCompType::ReplyToSender || mType == nsIMsgCompType::ReplyToSenderAndGroup || @@ -2834,6 +2866,7 @@ nsresult nsMsgCompose::ProcessReplyFlags // for this URI. if (mType == nsIMsgCompType::Reply || mType == nsIMsgCompType::ReplyAll || + mType == nsIMsgCompType::ReplyToList || mType == nsIMsgCompType::ReplyToGroup || mType == nsIMsgCompType::ReplyToSender || mType == nsIMsgCompType::ReplyToSenderAndGroup || @@ -3745,6 +3778,7 @@ nsMsgCompose::BuildBodyMessageAndSignatu case nsIMsgCompType::New : case nsIMsgCompType::Reply : /* should not happen! but just in case */ case nsIMsgCompType::ReplyAll : /* should not happen! but just in case */ + case nsIMsgCompType::ReplyToList : /* should not happen! but just in case */ case nsIMsgCompType::ForwardAsAttachment : /* should not happen! but just in case */ case nsIMsgCompType::ForwardInline : case nsIMsgCompType::NewsPost : Index: mailnews/mime/public/nsMailHeaders.h =================================================================== RCS file: /cvsroot/mozilla/mailnews/mime/public/nsMailHeaders.h,v retrieving revision 1.11 diff -u -p -6 -r1.11 nsMailHeaders.h --- mailnews/mime/public/nsMailHeaders.h 28 Feb 2005 17:10:57 -0000 1.11 +++ mailnews/mime/public/nsMailHeaders.h 14 Aug 2006 07:31:12 -0000 @@ -62,12 +62,13 @@ #define HEADER_DISTRIBUTION "Distribution" #define HEADER_FCC "FCC" #define HEADER_FOLLOWUP_TO "Followup-To" #define HEADER_FROM "From" #define HEADER_STATUS "Status" #define HEADER_LINES "Lines" +#define HEADER_LIST_POST "List-Post" #define HEADER_MAIL_FOLLOWUP_TO "Mail-Followup-To" #define HEADER_MAIL_REPLY_TO "Mail-Reply-To" #define HEADER_MESSAGE_ID "Message-ID" #define HEADER_MIME_VERSION "MIME-Version" #define HEADER_NEWSGROUPS "Newsgroups" #define HEADER_ORGANIZATION "Organization" @@ -99,12 +100,13 @@ #define HEADER_X_SUN_CONTENT_LINES "X-Sun-Content-Lines" #define HEADER_X_SUN_DATA_DESCRIPTION "X-Sun-Data-Description" #define HEADER_X_SUN_DATA_NAME "X-Sun-Data-Name" #define HEADER_X_SUN_DATA_TYPE "X-Sun-Data-Type" #define HEADER_X_SUN_ENCODING_INFO "X-Sun-Encoding-Info" #define HEADER_X_PRIORITY "X-Priority" +#define HEADER_X_REPLY_TO "X-Reply-To" #define HEADER_PARM_CHARSET "charset" #define HEADER_PARM_START "start" #define HEADER_PARM_BOUNDARY "BOUNDARY" #define HEADER_PARM_FILENAME "FILENAME" #define HEADER_PARM_NAME "NAME"