Results 1 to 2 of 2

Thread: [email] actual sent date ignored by SugarCRM

  1. #1
    ppsm is offline Senior Member
    Join Date
    Jan 2010
    Posts
    43

    Default [email] actual sent date ignored by SugarCRM

    I have a mail in my INBOX for which SugarCRM seems to have difficulties to detect the Date sent.

    In gmail, this email has a valid date : Sat, May 30, 2009 at 1:37 PM

    In SugarCRM, when I created my mail account and looked at the INBOX for the 1st time, this specific email landed to the top of the list with "Date sent" = the current time 2010-01-15 10:22.


    ---
    Environment:
    SugarCRM Community Edition 5.5.1. RC1 (same problem in 5.5.0).
    php 5.2.11

  2. #2
    johnmurray is offline Sugar Community Member
    Join Date
    Aug 2007
    Posts
    16

    Default Re: [email] actual sent date ignored by SugarCRM

    I've long been annoyed by a problem that sounds similar. See Sugar bug 25254.

    Finally today I traced the problem in my 5.5.2 CE. It's a fault in getUnixHeaderDate within modules/InboundEmail/InboundEmail.php. My IMAP server (Exchange Server 5.5) sometimes returned the message date with a trailing space, probably whenever the day number was a single digit. Processing in getUnixHeaderDate saw the date as invalid and returned 'now' instead.

    To correct the problem, start off with a trim(). The inserted line is in red:

    function getUnixHeaderDate($headerDate) {
    global $timedate;

    if (empty($headerDate)) {
    return "";
    }
    ///////////////////////////////////////////////////////////////////
    //// CALCULATE CORRECT SENT DATE/TIME FOR EMAIL
    if(!empty($headerDate)) {

    // JM, 12Aug10 - bug 25254 - strip trailing space that come in some header dates (maybe ones with 1-digit day number)
    $headerDate = trim($headerDate);

    // need to hack PHP/windows' bad handling of strings when using POP3
    if(strstr($headerDate,'+0000 GMT')) {
    ...


    I hope this is useful.

    John

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 2010-02-01, 07:34 AM
  2. Replies: 0
    Last Post: 2010-01-13, 10:55 AM
  3. Replies: 5
    Last Post: 2009-11-16, 10:53 AM
  4. Replies: 2
    Last Post: 2009-03-05, 06:46 PM
  5. Actual effort in tasks
    By techneitsolutions in forum Developer Help
    Replies: 0
    Last Post: 2006-11-20, 08:19 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •