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
This commit is contained in:
Dan Winship
2000-06-21 18:15:27 +00:00
parent 42d0cc5ca7
commit 242ffb8b8e
2 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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* */