On Sat, 10 Aug 2002 09:56:03 -0700 [EMAIL PROTECTED] wrote:
> http://mahogany.sourceforge.net/cgi-bin/show_bug.cgi?id=677
> ------- Additional Comments From [EMAIL PROTECTED] 2002-08-10 09:56
> I think this patch fixes the problem, but I don't have a compiler so I
> can't test it. The RemoveHeaderEntry() might not be required, but I
> couldn't figure out where the Message-ID header line is actually written,
> so I'm not sure that not removing Message-ID wouldn't result in two
> identical lines.
If anyone want's an unmangled copy of the patch, it's attached to this
message.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
--- M-Old/src/mail/SendMessageCC.cpp 2002-07-31 09:43:29.000000000 -0700
+++ m/src/mail/SendMessageCC.cpp 2002-08-10 09:49:57.000000000 -0700
@@ -1043,7 +1043,14 @@ SendMessageCC::Build(bool forStorage)
m_Envelope->date = cpystr(tmpbuf);
// Message-Id:
- m_Envelope->message_id = cpystr(BuildMessageId(m_DefaultHost));
+ if ( ! HasHeaderEntry("Message-ID") )
+ // No Message-ID yet, add new one to envelope
+ m_Envelope->message_id = cpystr(BuildMessageId(m_DefaultHost));
+ else {
+ // Move existing Message-ID to envelope
+ SetAddressField(&m_Envelope->message_id, GetHeaderEntry("Message-ID"));
+ RemoveHeaderEntry("Message-ID");
+ }
// don't add any more headers to the message being resent
if ( m_Envelope->remail )