Author Topic: 1.6.1 Email Bug - wrong sent date  (Read 2942 times)

stefan

  • Freshman
  • *
  • Posts: 27
    • View Profile
1.6.1 Email Bug - wrong sent date
« on: January 13, 2010, 12:33:17 pm »
Hi there,

after upgrading from 1.5.3 to 1.6.1 i encountered a strange bug.

My email account in opengoo is configured to download my INBOX and SENT folder from our IMAP server.

In the e-mail listing in opengoo under "sent" all emails have the same date which is the current date and time, if you wait a minute and refresh the page the sent dates of all e-mails will change accordingly.
Only mails downloaded with 1.6.1 get the wrong time stamp, mails downloaded with 1.5.3 have correct sent dates.

What has been changed in the 1.6.1 version regarding the list view of sent mails.
Which line in the source do i have to change to get the correct dates displayed in the list view.


Best regards


Stefan

zarathustra.at

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: 1.6.1 Email Bug - wrong sent date
« Reply #1 on: January 18, 2010, 02:50:08 pm »
Exactly the same problem here - although I have some old messages which are displayed correctly.

zarathustra.at

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: 1.6.1 Email Bug - wrong sent date
« Reply #2 on: January 23, 2010, 10:17:44 am »
I've checked my database

prefix_mail_contents - "received_date" and found out that all mails have

1970-01-01 00:00:00

as received date (I just have the symptoms of the op in my received mails).

So I suppose this problem connects to this post http://forums.fengoffice.com/index.php?topic=3574.0

stefan

  • Freshman
  • *
  • Posts: 27
    • View Profile
Re: 1.6.1 Email Bug - wrong sent date
« Reply #3 on: January 25, 2010, 05:32:53 am »
Exactly the same problem here - although I have some old messages which are displayed correctly.

A possible solution, on our side now everything work flawlessly.

Change line 1878 in MailController.class.php

from:

"date" => $msg->getReceivedDate() instanceof DateTimeValue ? ($msg->getReceivedDate()->isToday() ? format_time($msg->getReceivedDate()) : format_datetime($msg->getReceivedDate())) : lang('n/a'),

to:

"date" => $msg->getSentDate() instanceof DateTimeValue ? ($msg->getSentDate()->isToday() ? format_time($msg->getSentDate()) : format_datetime($msg->getSentDate())) : lang('n/a'),



and line 163 in \application\views\mail\view.php


from:


$info_date = $info->getReceivedDate() instanceof DateTimeValue ? ($info->getReceivedDate()->isToday() ? format_time($info->getReceivedDate()) : format_datetime($info->getReceivedDate())) : lang('n/a');

to:

$info_date = $info->getSentDate() instanceof DateTimeValue ? ($info->getSentDate()->isToday() ? format_time($info->getSentDate()) : format_datetime($info->getSentDate())) : lang('n/a');



Greetings

Stefan