I have looked around in the source code (of the wxWidgets-version since I dont have the MFC headers):
The reason why the date is missing:
you are reading the fields one by one of every email and if you find the date in either the "Received: " or "Date: " fields you read in from there and set a boolean value to false so that this date does not get overwritten again in the memory...
( mail.cpp:153 )
There is a problem in the way you read the date from the "Received: " field... you assume that it is stored completely in only one line without line break. These mails where the date is not being displayed do all have linebreaks in the date representations :D
"with SMTP id H559LF00.OQK for <Testuser@compuserve.de>; Wed, 6
Nov 2002 08:46:27 +0100 "
So you could at least check if the date was read properly before you set the bDate variable to false so that it can never be replaced by another field containing easier readable date representations :D
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I finally did fix it... i changed mail.cpp beginning at line 160. If the Received: filed is broken into several lines like this:
Received: bla bla ...
field info goes on
and on
until this line
NextField: 123
...
Then the lines beginning with at least one space or tab are read in and treated as one single line... the tabs and spaces at the beginning are being substituded with one single space. The Received: field always seems to end with the date so the last linebreak or the field is the end marker of the date string:
Logged In: YES
user_id=917543
Originator: YES
I have looked around in the source code (of the wxWidgets-version since I dont have the MFC headers):
The reason why the date is missing:
you are reading the fields one by one of every email and if you find the date in either the "Received: " or "Date: " fields you read in from there and set a boolean value to false so that this date does not get overwritten again in the memory...
( mail.cpp:153 )
There is a problem in the way you read the date from the "Received: " field... you assume that it is stored completely in only one line without line break. These mails where the date is not being displayed do all have linebreaks in the date representations :D
"with SMTP id H559LF00.OQK for <Testuser@compuserve.de>; Wed, 6
Nov 2002 08:46:27 +0100 "
So you could at least check if the date was read properly before you set the bDate variable to false so that it can never be replaced by another field containing easier readable date representations :D
Logged In: YES
user_id=917543
Originator: YES
btw:
date.cpp:189
date = tm.Format("%d/%m/%y %H:%I"); <- this format shows 24-hours:12-hours instead of 24-hours:minutes :D
-> date = tm.Format("%d/%m/%y %H:%M");
Logged In: YES
user_id=917543
Originator: YES
... the same at date.cpp:209
Logged In: YES
user_id=917543
Originator: YES
I finally did fix it... i changed mail.cpp beginning at line 160. If the Received: filed is broken into several lines like this:
Received: bla bla ...
field info goes on
and on
until this line
NextField: 123
...
Then the lines beginning with at least one space or tab are read in and treated as one single line... the tabs and spaces at the beginning are being substituded with one single space. The Received: field always seems to end with the date so the last linebreak or the field is the end marker of the date string:
line 160: char *el;
Now you just need to copy and paste it :D
Thanks for the bugfixes
I have updated the sources and binaries even though I have not had the chance to test the wx sources