Jump to content
X2Community Forums

Received Emails from contacts not showing in activity until after manually viewing

Recommended Posts

New emails from contacts are not registering with the contact until after I've manually viewed the email from the email tab. It used to show new emails from contacts in the activity window without needing to open the email first. Is there a setting I can change or a way to trouble shoot what might be happening here?

Link to post
Share on other sites

this is the error message the cron job is putting out



X-Powered-By: PHP/7.3.21
Content-type: text/html; charset=UTF-8

PHP Error[8]: Undefined index: SCRIPT_FILENAME
    in file x2crm/x2engine/framework/yii.php at line 45

#0 x2crm/x2engine/framework/yii.php(59): getScriptFile()
#1 x2crm/x2engine/framework/yii.php(90): getRootPath()
#2 x2crm/x2engine/framework/yii.php(218): getCustomPath()
#3 x2crm/x2engine/framework/yii.php(156): x2_autoload()
#4 x2crm/x2engine/framework/YiiBase.php(207): import()
#5 x2crm/x2engine/framework/base/CComponent.php(329): createComponent()
#6 x2crm/x2engine/framework/base/CComponent.php(298): CConsoleApplication->attachBehavior()
#7 x2crm/x2engine/framework/base/CApplication.php(167): CConsoleApplication->attachBehaviors()
#8 x2crm/x2engine/framework/YiiBase.php(135): CConsoleApplication->__construct()
#9 x2crm/x2engine/framework/YiiBase.php(123): createApplication()
#10 x2crm/x2engine/framework/yiic.php(23): createConsoleApplication()
#11 x2crm/x2engine/protected/yiic.php(8): require_once()
#12 x2crm/x2engine/protected/yiic(3): require_once()

Link to post
Share on other sites

Okay, figured it out, I'm Using GoDaddy Cpanel on a linux server and had to use the following as my Cron job /usr/local/bin/php x2crm/x2engine/protected/yiic logEmail


Though auto logging of inbound Emails is now working as intended. I'm still getting an error from the cron,


PHP Error[8]: Undefined property: stdClass::$to
    in filex2crm/x2engine/protected/modules/emailInboxes/models/EmailInboxes.php at line 1032
#0 unknown(0): EmailInboxes->{closure}()
#1 x2crm/x2engine/protected/modules/emailInboxes/models/EmailInboxes.php(1034): array_filter()
#2 x2crm/x2engine/protected/commands/LogEmailCommand.php(68): EmailInboxes->logRecentMessages()
#3 x2crm/x2engine/framework/console/CConsoleCommandRunner.php(71): LogEmailCommand->run()
#4 x2crm/x2engine/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#5 x2crm/x2engine/framework/base/CApplication.php(185): CConsoleApplication->processRequest()
#6 x2crm/x2engine/framework/yiic.php(33): CConsoleApplication->run()
#7 x2crm/x2engine/protected/yiic.php(8): require_once()
#8 x2crm/x2engine/protected/yiic(4): require_once()

  • Like 1
Link to post
Share on other sites

 Im pretty sure I should file this as a bug....


My console log file up to the error is...

2020/10/28 21:45:01 [trace] [application.automation.cron] Logging recent emails for inbox 2
2020/10/28 21:45:01 [trace] [application.automation.cron] Beginning inbound logging for folder INBOX in inbox 2
2020/10/28 21:45:01 [warning] [application.automation.cron] Message "test6" already associated with Contact john doe
2020/10/28 21:45:01 [trace] [application.automation.cron] Beginning inbound logging for folder INBOX.Archive in inbox 2
2020/10/28 21:45:01 [trace] [application.automation.cron] Beginning inbound logging for folder INBOX.spam in inbox 2
2020/10/28 21:45:01 [trace] [application.automation.cron] Beginning inbound logging for folder INBOX.Sent in inbox 2
2020/10/28 21:45:01 [trace] [application.automation.cron] Beginning inbound logging for folder INBOX.Drafts in inbox 2
2020/10/28 21:45:01 [error]
 Undefined property: stdClass::$to (x2crm/x2engine/protected/modules/emailInboxes/models/EmailInboxes.php:1032)
Stack trace:
#0 x2crm/x2engine/protected/commands/LogEmailCommand.php(68): EmailInboxes->logRecentMessages()
after looking at the code, If you have a draft saved that was not addressed to anyone ("$e->to" is unset), it errors out and does not finish the rest of the Logging job. It should fail gracefully instead of erroring out in this case.
After deleting my drafts that did not contain a TO header... i now have an entire years worth of back logged emails from another account that wasn't being checked because of this error. LOL
I dont mind doing a pull request on the project to help fix this up. Just point me in the right direction to best help the community, pull request or bug report. This really is a decent CRM and I'm happy to help in anyway I can 
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...