Whats going on with Group Email Incoming??

Are you still getting this error?

Wed Apr 10 09:59:05 2019 [2471][1][INFO] Query:UPDATE job_queue 					SET `assigned_user_id`='1',`name`='Check Inbound Mailboxes',`date_modified`='2019-04-09 23:59:02',`scheduler_id`='4afc8809-dfd6-59bb-94ed-5cac9c655c08',`execute_time`='2019-04-09 23:59:00',`status`='done',`resolution`='success',`message`='Warning [2]: Declaration of AOPInboundEmail::handleCreateCase(Email $email, $userId) should be compatible with InboundEmail::handleCreateCase($email, $userId) in /var/www/html/suitecrm/modules/InboundEmail/AOPInboundEmail.php on line 27\nWarning [2]: count(): Parameter must be an array or an object that implements Countable in /var/www/html/suitecrm/modules/InboundEmail/InboundEmail.php on line 6126\nWarning [2]: imap_append() expects at least 3 parameters, 1 given in /var/www/html/suitecrm/include/Imap/ImapHandler.php on line 456\n',`target`='function::pollMonitoredInboxesAOP',`data`=NULL,`requeue`=0,`retry_count`=NULL,`failure_count`=NULL,`job_delay`=0,`client`='CRONe0f3855106ec70d44f4ededfc583bcc8:2471',`percent_complete`=NULL

I upgraded my production environment from 7.8.2 to 7.8.28 after verifying it was the latest that created cases reading my Exchange Online email account. In 7.8.28, case creation works without issues as before.

Now Iā€™m going to duplicate the environment again to test more recent versions, and Iā€™ll post the error I see.

These are the results of my todayā€™s tests on case creation reading Exchange Online mailbox:

7.8.2: no issues on case creation
7.8.28: no issues
7.8.29: no issues
7.9.17: no issues

7.10.15: cases not created, this is what I see about ImapHandler in log file:


Tue May  7 16:48:03 2019 [5584][1][DEBUG] Using system default ImapHandler. Hint: Use any ImapHandlerInterface as dependency of InboundEmail
Tue May  7 16:48:03 2019 [5584][1][DEBUG] ImapHandlerFactory will using a ImapHandler
ā€¦
Tue May  7 16:48:03 2019 [5584][1][ERROR] ImapHandler trying to use a non valid resource stream.
Tue May  7 16:48:03 2019 [5584][1][ERROR] ImapHandler trying to use a non valid resource stream.
ā€¦
Tue May  7 16:48:04 2019 [5584][1][INFO] Query:UPDATE job_queue 					SET `assigned_user_id`='1',`name`='Check Inbound Mailboxes',`date_modified`='2019-05-07 14:48:02',`scheduler_id`='c05dd0fd-f5ad-0342-1b33-58ad75533273',`execute_time`='2019-05-07 14:48:00',`status`='done',`resolution`='success',`message`='Warning [2]: Declaration of AOPInboundEmail::handleCreateCase(Email $email, $userId) should be compatible with InboundEmail::handleCreateCase($email, $userId) in C:\\xampp\\htdocs\\incoCRM_UPD\\modules\\InboundEmail\\AOPInboundEmail.php on line 27\r\nWarning [2]: imap_append() expects at least 3 parameters, 1 given in C:\\xampp\\htdocs\\incoCRM_UPD\\include\\Imap\\ImapHandler.php on line 456\r\n',`target`='function::pollMonitoredInboxesAOP',`data`=NULL,`requeue`=0,`retry_count`=NULL,`failure_count`=NULL,`job_delay`=0,`client`='CRON57ca7054365913e94e68b45ed9fbf085:5584',`percent_complete`=NULL 					 WHERE  job_queue.id = 'dd4e78ae-ac8e-8c83-4c1c-5cd19a5378f1' AND deleted=0

PHP 7.1.28.

Iā€™m going to upgrade my production environment to suiteCRM 7.9.17.

Iā€™m am having similar issues. When I create a case manually, it works great.

When a client replies to a case, everything goes as expected.

However, when a new case is created via email from AOP, It sends two emails. One email works as expected from the support email address and all its good. Then it sends a second one from the ā€œsystemā€ email address which is a mess and none of the fields are populated it just shows all the variables.

Iā€™m on 7.11.2

If the people who have this error


Warning [2]: Declaration of 
AOPInboundEmail::handleCreateCase(Email $email, $userId) should be compatible with 
InboundEmail::handleCreateCase($email, $userId) in /var/www/html/suitecrm/modules/InboundEmail/AOPInboundEmail.php on line 27

can please try changing this line

https://github.com/salesagility/SuiteCRM/blob/master/modules/InboundEmail/InboundEmail.php#L3571

to this

public function handleCreateCase(Email $email, $userId)

and then tell me if something improved. Thanks.

P.S. - Iā€™m still exploring, but I think this fix here might be the one that caused this recession https://github.com/salesagility/SuiteCRM/pull/6441

I made the change in InboundEmail.php but still no luck in importing cases. Now the error is:


Tue May 14 12:47:25 2019 [2724][1][INFO] Query:UPDATE job_queue 					SET `assigned_user_id`='1',`name`='Check Inbound Mailboxes',`date_modified`='2019-05-14 10:47:23',`scheduler_id`='c05dd0fd-f5ad-0342-1b33-58ad75533273',`execute_time`='2019-05-14 10:47:00',`status`='done',`resolution`='success',`message`='Warning [2]: imap_append() expects at least 3 parameters, 1 given in C:\\xampp\\htdocs\\incoCRM_UPD\\include\\Imap\\ImapHandler.php on line 456\r\n',`target`='function::pollMonitoredInboxesAOP',`data`=NULL,`requeue`=0,`retry_count`=NULL,`failure_count`=NULL,`job_delay`=0,`client`='CRON57ca7054365913e94e68b45ed9fbf085:2724',`percent_complete`=NULL 					 WHERE  job_queue.id = '1b081511-71fc-0f96-75b1-5cda9ce5dba7' AND deleted=0

I tried it in suiteCRM 7.10.15.

It seems this is a known issue, and there is a suggested solution

Please see
https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/22119-automatic-import-of-e-mails-after-upgrade-not-function

and then
https://github.com/salesagility/SuiteCRM/issues/6866

It appears this fix is to address the Exchange issue. I havent tested completely. But if someone can send me the files from an 7.11.4 version it would be appreciated. I made the changes but not sure I did correctly.

But the main issue for me has always been that the email is sending from the admin address I entered during install, not the group address. I am filling out From and Reply To fields in the Group account. I leave the AOP email details blank because if I enter anything here it appears to break things.

Latest log

From address and name pair format is incorrect, use "from@emailaddress.org <Name of Person>" format.
From address and name pair is invalid.
codes:1, 4, 7, 10, 16, 15
Wed May 15 17:16:22 2019 [110877][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:16:22 2019 [110877][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:16:22 2019 [110877][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:16:22 2019 [110877][1][ERROR] Invalid email address given: [Michael Allen ] Called at /var/www/html/suitecrm_7_11/modules/InboundEmail/AOPInboundEmail.php:201 from function handleReplyType.
Wed May 15 17:16:22 2019 [110877][1][ERROR] Invalid email address given: [Michael Allen ] Called at /var/www/html/suitecrm_7_11/modules/InboundEmail/AOPInboundEmail.php:202 from function displayComposeEmail.
Wed May 15 17:16:22 2019 [110877][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (Reply-To):
Wed May 15 17:16:22 2019 [110877][1][FATAL] Attachements not found
Wed May 15 17:16:22 2019 [110877][1][ERROR] Invalid email from address or name detected before sending. Details:
From field is not set.
From-name is not set.
From address and name pair is not set.
codes:1, 7, 13
Invalid address:  (Reply-To):
Wed May 15 17:17:02 2019 [110897][1][ERROR] ImapHandler trying to use a non valid resource stream.
Wed May 15 17:17:02 2019 [110897][1][ERROR] ImapHandler trying to use a non valid resource stream.
Wed May 15 17:17:02 2019 [110897][1][FATAL] *** FOLDERS: addBean() is trying to save to a non-saved or non-existent folder
Wed May 15 17:17:02 2019 [110897][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:17:02 2019 [110897][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:17:02 2019 [110897][1][ERROR] Saving Email with invalid From name and/or Address. Details:
From field is not set.
From address is not set.
From-name is not set.
From name is not set.
From address and name pair format is incorrect, use "from@emailaddress.org <Name of Person>" format.
From address and name pair is invalid.
codes:1, 4, 7, 10, 16, 15
Wed May 15 17:17:02 2019 [110897][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:17:02 2019 [110897][1][ERROR] Contact address is incorrect to Email: 552aabe2-d787-315c-f5d0-5cdbac46e837
Wed May 15 17:17:02 2019 [110897][1][FATAL] *** FOLDERS: addBean() is trying to save to a non-saved or non-existent folder
Wed May 15 17:17:02 2019 [110897][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:17:02 2019 [110897][1][ERROR] Saving Email with invalid From name and/or Address. Details:
From field is not set.
From address is not set.
From-name is not set.
From name is not set.
From address and name pair format is incorrect, use "from@emailaddress.org <Name of Person>" format.
From address and name pair is invalid.
codes:1, 4, 7, 10, 16, 15
Wed May 15 17:17:02 2019 [110897][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:17:02 2019 [110897][1][ERROR] Contact address is incorrect to Email: 552aabe2-d787-315c-f5d0-5cdbac46e837
Wed May 15 17:17:02 2019 [110897][1][FATAL] *** FOLDERS: addBean() is trying to save to a non-saved or non-existent folder
Wed May 15 17:17:02 2019 [110897][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:17:02 2019 [110897][1][ERROR] Saving Email with invalid From name and/or Address. Details:
From field is not set.
From address is not set.
From-name is not set.
From name is not set.
From address and name pair format is incorrect, use "from@emailaddress.org <Name of Person>" format.
From address and name pair is invalid.
codes:1, 4, 7, 10, 16, 15
Wed May 15 17:17:02 2019 [110897][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:17:02 2019 [110897][1][ERROR] Contact address is incorrect to Email: 552aabe2-d787-315c-f5d0-5cdbac46e837
Wed May 15 17:17:02 2019 [110897][1][FATAL] *** FOLDERS: addBean() is trying to save to a non-saved or non-existent folder
Wed May 15 17:17:02 2019 [110897][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:17:02 2019 [110897][1][ERROR] Saving Email with invalid From name and/or Address. Details:
From field is not set.
From address is not set.
From-name is not set.
From name is not set.
From address and name pair format is incorrect, use "from@emailaddress.org <Name of Person>" format.
From address and name pair is invalid.
codes:1, 4, 7, 10, 16, 15
Wed May 15 17:17:02 2019 [110897][1][ERROR] Unable to find relationship emails_email_templates
Wed May 15 17:17:02 2019 [110897][1][ERROR] Contact address is incorrect to Email: 552aabe2-d787-315c-f5d0-5cdbac46e837
Wed May 15 17:17:15 2019 [110838][1][FATAL] [ERROR] Failed to remove bean to index
Wed May 15 17:17:15 2019 [110838][1][FATAL] [ERROR] SuiteCRM\Search\Exceptions\SearchException: Elasticsearch trying to re-indexing a bean but indexer is disabled in configuration. in /var/www/html/suitecrm_7_11/lib/Search/ElasticSearch/ElasticSearchHooks.php:123
Stack trace:
#0 /var/www/html/suitecrm_7_11/lib/Search/ElasticSearch/ElasticSearchHooks.php(105): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndex(Object(InboundEmail))
#1 /var/www/html/suitecrm_7_11/lib/Search/ElasticSearch/ElasticSearchHooks.php(92): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndexSafe(Object(InboundEmail))
#2 /var/www/html/suitecrm_7_11/include/utils/LogicHook.php(272): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->beanDeleted(Object(InboundEmail), 'after_delete', Array)
#3 /var/www/html/suitecrm_7_11/include/utils/LogicHook.php(213): LogicHook->process_hooks(Array, 'after_delete', Array)
#4 /var/www/html/suitecrm_7_11/data/SugarBean.php(3129): LogicHook->call_custom_logic('InboundEmail', 'after_delete', Array)
#5 /var/www/html/suitecrm_7_11/data/SugarBean.php(5267): SugarBean->call_custom_logic('after_delete', Array)
#6 /var/www/html/suitecrm_7_11/modules/InboundEmail/InboundEmail.php(292): SugarBean->mark_deleted('444002f5-aafd-8...')
#7 /var/www/html/suitecrm_7_11/modules/InboundEmail/Delete.php(54): InboundEmail->mark_deleted('444002f5-aafd-8...')
#8 /var/www/html/suitecrm_7_11/include/MVC/View/SugarView.php(834): include_once('/var/www/html/s...')
#9 /var/www/html/suitecrm_7_11/include/MVC/View/views/view.classic.php(72): SugarView->includeClassicFile('modules/Inbound...')
#10 /var/www/html/suitecrm_7_11/include/MVC/View/SugarView.php(226): ViewClassic->display()
#11 /var/www/html/suitecrm_7_11/include/MVC/Controller/SugarController.php(435): SugarView->process()
#12 /var/www/html/suitecrm_7_11/include/MVC/Controller/SugarController.php(375): SugarController->processView()
#13 /var/www/html/suitecrm_7_11/include/MVC/SugarApplication.php(113): SugarController->execute()
#14 /var/www/html/suitecrm_7_11/index.php(52): SugarApplication->execute()
#15 {main}
Wed May 15 17:19:01 2019 [110935][1][ERROR] ImapHandler trying to use a non valid resource stream.
Wed May 15 17:19:01 2019 [110935][1][ERROR] ImapHandler trying to use a non valid resource stream.
Wed May 15 17:20:01 2019 [110956][1][ERROR] ImapHandler trying to use a non valid resource stream.
Wed May 15 17:20:01 2019 [110956][1][ERROR] ImapHandler trying to use a non valid resource stream.
Wed May 15 17:21:02 2019 [110994][1][ERROR] ImapHandler trying to use a non valid resource stream.
Wed May 15 17:21:02 2019 [110994][1][ERROR] ImapHandler trying to use a non valid resource stream.

I tested this. The system wants to send via the settings in the Email Settings page and disregards Outgoing email overrides. If I change the Email settings to the email I need for Cases, I get the email I want. However, now all system messages are sent through that account.

This is really appalling. In 7.11.7 no cases are created at all. I am getting:

Sun Aug 25 19:27:50 2019 [10124][1][ERROR] ImapHandler trying to set a non valid resource az stream.
Sun Aug 25 19:27:50 2019 [10124][1][ERROR] ImapHandler trying to use a non valid resource stream.

Have you all found a fix please? Iā€™ve sent this link within their Gitter channel as it has gone on and on and on and on and it seems to me that it is now worse than ever in the latest release.

Thanks.

Updating to 7.11.8 hasnā€™t fixed the issue of no cases being created but it seems the errors have disappeared anywayā€¦at least for the moment.

@indieben2 which of these two versions of the file do you have in your system, the one on the left, or the one on the right?

https://github.com/salesagility/SuiteCRM/commit/2ebe3538ab61a4bc2e20a5b3e28694b52b2336d8

Hi Pgr,

Thanks for your message.

I have just checked this and I have the right (green, changed) version.

I have upgraded to version 7.11.8 last night though in the hope of getting this sorted.

I have done a diagnostics and downloaded everything - is there anything in particular that I could attach that would be useful to you?

From a configuration stand point:

a) I have successfully linked Joomla portal to Suite CRM.

b) I have set up a group Email inbox and this receives Emails and Emails are received within Suite CRM.

c) I have now waited overnight to see if a case was created from the Email received or whether an Email was fired back with a Joomla portal login (with the first Email and all subsequent Emails attached within the userā€™s portal (expected behaviour) - this has not happened.

d) I have checked my sys log (Iā€™m using Debian 10 with Maria DB and PHP 7.0 running on the web server) - there are references to cron jobā€™s - they donā€™t appear to be erroring although I wouldnā€™t totally trust me on that as I am not confident with cron jobs (I have followed the instructions of adding in the cron instruction from the install though and the web server has since been rebooted).

Aug 25 22:40:01 jacob2 CRON[23945]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)

There doesnā€™t appear to be any references to Suite CRM though (what would be the command to find any Suite CRM cron job reference if confirmation either way would help please?)

e) Suite CRM is set up as follows within Administration > Inbound Mail - https://snipboard.io/HLwGEA.jpg

and https://snipboard.io/3qKmZc.jpg

f) Not sure whether any schedulers are needed here, if so what please? Thanks :slight_smile:

About the Schedulers, please see this article

https://docs.suitecrm.com/blog/scheduler-jobs/

especially the final section, ā€œHow can I make sure the jobs are actually running?ā€

1 Like

Ok, I either see the problem or part of the problem. The cron IS being run under the right user (thatā€™s easy enough by following the instructions as Suite CRM picks it up at install.

However, totally my error (so apologies for this) I had printed off those install instructions during a previous install - due to a separate issue iā€™d done a new clean install of Suite CRM (totally unrelated problems that were to do with curl which now works fine). When I did the NEW install, I changed the directory name but I ran the old command and entered the directory wrong. Iā€™ve now edited that, is it that simple or are there any commands that need to be run upon editing the crontab considering that the instructions say that the crontab should not be updated until after the install is complete anyway?

Thanks.

Cases now being created, Emails coming through (with a separate issue) - recorded here (looks like a bug but I need some help verifying it as one please): https://suitecrm.com/suitecrm/forum/advanced-opensales-workflow-portal-support/27271-setting-up-a-portal-account-with-first-and-subsequent-emails-included-problems#88612

If thereā€™s no commands or anything that need running relating to my error in configuring the crontab, then my involvement can be considered finalised unless I can be of assistance to the OP(s) in any way.

Many thanks.