E-Mail synchronization not working - PHP namespace error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pschulz
    Junior Member
    • May 2016
    • 7

    E-Mail synchronization not working - PHP namespace error


    After enabling the cron job for scheduled services:

    * * * * * /usr/bin/php -f /var/www/yourespodirectory/cron.php > /dev/null 2>&1

    I get the following error which is related to importing e-mails from a synchronized IMAP account:

    PHP Fatal error: Cannot use Espo\Entities\Email as Email because the name is already in use in
    /var/www/html/espocrm/application/Espo/Services/InboundEmail.php on line 34

    I have solved it - just change the line 34 in
    /var/www/html/espocrm/application/Espo/Services/InboundEmail.php

    which normally reads:
    use \Espo\Entities\Email;

    to read:
    use \Espo\Entities\Email as EntityEmail;

    There is no direct reference to the Email namespace so this way it works.
    But this should be changed in the EspoCRM code as it actually is a bug, and should not be contained in the source code this way.

  • yuri
    Member
    • Mar 2014
    • 8511

    #2
    Thank you. Seems it did not cause fatal error in php 5.*
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...