aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-06-22 02:15:27 +0800
committerDan Winship <danw@src.gnome.org>2000-06-22 02:15:27 +0800
commit242ffb8b8efa42579d6b36339f86f09b894c525e (patch)
treed61bee1c6c6f16dd112670f2e3115772e5b02fa8 /camel
parent42d0cc5ca71d52130cea48c481344ce081b158a1 (diff)
downloadgsoc2013-evolution-242ffb8b8efa42579d6b36339f86f09b894c525e.tar.gz
gsoc2013-evolution-242ffb8b8efa42579d6b36339f86f09b894c525e.tar.zst
gsoc2013-evolution-242ffb8b8efa42579d6b36339f86f09b894c525e.zip
Set date_received based on the first (most recent) "Received" header.
* camel-folder-summary.c (message_info_new): Set date_received based on the first (most recent) "Received" header. svn path=/trunk/; revision=3677
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* */