Bug 146534 - mails started from a template have wrong date
Summary: mails started from a template have wrong date
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.9.7
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 146704 147452 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-08 12:29 UTC by cobaco
Modified: 2007-07-02 15:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cobaco 2007-06-08 12:29:48 UTC
Version:           1.9.7 (using KDE 3.5.7, Debian Package 4:3.5.7.dfsg.1-1 (lenny/sid))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.21-1-686

The date header of mails started from a template has the 'creation date of the template' in the date header of the mail instead of 'time when mail is send'
Comment 1 Martin Koller 2007-06-11 16:59:44 UTC
I can see this, too in 3.5.7
Comment 2 Jonathan Marten 2007-06-12 17:36:17 UTC
SVN commit 674569 by marten:

Remove date and message-id from template message, so that new message
will be assigned new up-to-date ones.

CCBUG:146534


 M  +4 -0      kmcommands.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmcommands.cpp #674568:674569
@@ -699,6 +699,10 @@
   KMMessage *newMsg = new KMMessage( new DwMessage( *msg->asDwMessage() ) );
   newMsg->setComplete( msg->isComplete() );
 
+  // these fields need to be regenerated for the new message
+  newMsg->removeHeaderField("Date");
+  newMsg->removeHeaderField("Message-ID");
+
   KMail::Composer *win = KMail::makeComposer();
   newMsg->setTransferInProgress( false ); // From here on on, the composer owns the message.
   win->setMsg( newMsg, FALSE, TRUE );
Comment 3 Jonathan Marten 2007-06-12 17:39:29 UTC
SVN commit 674571 by marten:

Forward port of 674569 from 3.5 branch:
Remove date and message-id from template message, so that new message 
will be assigned new up-to-date ones. 
  
BUG:146534 


 M  +4 -0      kmcommands.cpp  


--- trunk/KDE/kdepim/kmail/kmcommands.cpp #674570:674571
@@ -706,6 +706,10 @@
   KMMessage *newMsg = new KMMessage( new DwMessage( *msg->asDwMessage() ) );
   newMsg->setComplete( msg->isComplete() );
 
+  // these fields need to be regenerated for the new message
+  newMsg->removeHeaderField("Date");
+  newMsg->removeHeaderField("Message-ID");
+
   KMail::Composer *win = KMail::makeComposer();
   newMsg->setTransferInProgress( false ); // From here on on, the composer owns the message.
   win->setMsg( newMsg, false, true );
Comment 4 Thomas McGuire 2007-06-12 17:43:46 UTC
*** Bug 146704 has been marked as a duplicate of this bug. ***
Comment 5 Jonathan Marten 2007-07-02 15:23:27 UTC
*** Bug 147452 has been marked as a duplicate of this bug. ***