aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-folder-summary.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index c35d9ddcad..ba8d9e709a 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-21 Dan Winship <danw@helixcode.com>
+
+ * camel-folder-summary.c (message_info_new): Set date_received
+ based on the first (most recent) "Received" header.
+
2000-06-20 Dan Winship <danw@helixcode.com>
* camel-mime-part.c (write_to_stream): flush the filter stream
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 175737d1cf..dd99921924 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -961,6 +961,7 @@ static CamelMessageInfo *
message_info_new(CamelFolderSummary *s, struct _header_raw *h)
{
CamelMessageInfo *mi;
+ char *received;
mi = g_malloc0(s->message_info_size);
@@ -969,7 +970,13 @@ message_info_new(CamelFolderSummary *s, struct _header_raw *h)
mi->to = summary_format_address(h, "to");
mi->user_flags = NULL;
mi->date_sent = header_decode_date(header_raw_find(&h, "date", NULL), NULL);
- mi->date_received = 0;
+ received = header_raw_find(&h, "received", NULL);
+ if (received)
+ received = strrchr(received, ';');
+ if (received)
+ mi->date_received = header_decode_date(received + 1, NULL);
+ else
+ mi->date_received = 0;
mi->message_id = header_msgid_decode(header_raw_find(&h, "message-id", NULL));
/* if we have a references, use that, otherwise, see if we have an in-reply-to
header, with parsable content, otherwise *shrug* */