X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fimap_messages.php;h=9af572e9fb907efecee8fa80428abfe3fa1cb52b;hp=32ab26e99fe74f5858638f50673308ff25d1dc1d;hb=8fca0a655858da407d32d6d165c326a1c8738f73;hpb=8f7163e7fd1f5b7839fff1c1f3d6bcd37379e904 diff --git a/functions/imap_messages.php b/functions/imap_messages.php index 32ab26e9..9af572e9 100755 --- a/functions/imap_messages.php +++ b/functions/imap_messages.php @@ -77,6 +77,21 @@ } } + // If there isn't a date, it takes the internal date and uses + // that as the normal date. + if (trim($date) == "") { + fputs ($imap_stream, "a002 FETCH $id INTERNALDATE\r\n"); + $internal_read = sqimap_read_data ($imap_stream, "a002", true, $r, $m); + + // * 22 FETCH (INTERNALDATE " 8-Sep-2000 13:17:07 -0500") + $date = $internal_read[0]; + $date = eregi_replace(".*internaldate \"", "", $date); + $date = eregi_replace("\".*", "", $date); + $date_ary = explode(" ", trim($date)); + $date_ary[0] = str_replace("-", " ", $date_ary[0]); + $date = implode (" ", $date_ary); + } + $header = new small_header; if ($sent == true) $header->from = $to;