Emails imported automatically won't allow to change the user assigned to #3368

Closed
opened 2026-02-20 16:04:26 -05:00 by deekerman · 3 comments
Owner

Originally created by @labcerouno on GitHub (Oct 22, 2018).

Originally assigned to: @code-ph0y on GitHub.

In Group Email Account, if "Import emails automatically" is activated, it won't be possible to change the user which is assigned to or the contact which is related to.

Issue

For Group Email Accounts we can activate "Import emails automatically". The default behavior is:

  • all the messages received will be imported automatically;
  • they will also be assigned to Admin user; and
  • if the sender's contact is on the DB, it will be related to the proper contact, showing in the subpanels contact's page.

If I want to change the user which the message is assigned to, or the contact which it is related to, I should open the message and click Actions -> Edit.

For the messages automatically imported, the option "Edit" won't appear. Instead, it will show "Import", as if the message was not already imported. If I try to import and click "OK", it will take me to a blank page.

Related question: In our use case, we would like to activate the option "Import emails automatically" only to relate the messages automatically with the sender's contact. The automatic assign to admin user is useless for us. In previous versions, the emails would relate to the sender's contact without the need to activate "Import automatically". Since v7.10.9, the message needs to be imported in order to relate to the contact. Would it be another bug? Or it's the default behavior?

Expected Behavior

The messages imported automatically should show the option "Edit" in Actions menu, instead of "Import".

Actual Behavior

Actions menus show "Import" as if the message was not already imported. When importing, it shows a blank page and it will not change the user assigned to or the contact related to.

Possible Fix

Unknown

Steps to Reproduce

  1. Create a group email account
  2. For this account, activate "Import emails automatically"
  3. After an email was received and imported, open it
  4. In actions menu should be "Edit" instead of "import"
  5. Importing takes the user to a blank page

Some logs

Mon Oct 22 17:45:59 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] Email ID is Empty
Mon Oct 22 17:46:01 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] Request ssl value not found.
Mon Oct 22 17:46:01 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] Saving error level. Try to remove the error_reporting() function from your code.
Mon Oct 22 17:46:01 2018 [14162][1][WARN] There is no any workflow to run
Mon Oct 22 17:46:02 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][ERROR] Pop error level. Try to remove the error_reporting() function from your code.
Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][ERROR] fromUser: Conversion of   from user format d/m/Y H:i failed
Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][ERROR] Unable to find relationship emails_email_templates
Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] emails_email_templates for emails_email_templates failed to load

Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] Failed to load relationship emails_email_templates while saving Emails
Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] CaseUpdatesHook: saveEmailUpdate: Not a create case or wrong parent type
Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] CSS File Dawn/yui.css not found
Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] Undefined index: server_unique_key
Mon Oct 22 17:46:07 2018 [14162][1][WARN] Request ssl value not found.
Mon Oct 22 17:46:07 2018 [14162][1][WARN] Requested folder is not defined
Mon Oct 22 17:46:07 2018 [14162][1][WARN] Saving error level. Try to remove the error_reporting() function from your code.
Mon Oct 22 17:46:08 2018 [14138][1][WARN] CSS File Dawn/yui.css not found

Your Environment

  • SuiteCRM Version used: 7.10.9
  • Browser name and version: Chrome Version 69.0.3497.100 (Build oficial) (64 bits)
  • Environment name and version: MySQL 5.7 , PHP 7.2-fpm
  • Operating System and version: Ubuntu 18.04
Originally created by @labcerouno on GitHub (Oct 22, 2018). Originally assigned to: @code-ph0y on GitHub. In Group Email Account, if "Import emails automatically" is activated, it won't be possible to change the user which is assigned to or the contact which is related to. #### Issue For **Group Email Accounts** we can activate "Import emails automatically". The default behavior is: - all the messages received will be imported automatically; - they will also be assigned to Admin user; and - if the sender's contact is on the DB, it will be related to the proper contact, showing in the subpanels contact's page. If I want to change the user which the message is assigned to, or the contact which it is related to, I should open the message and click Actions -> Edit. **For the messages automatically imported, the option "Edit" won't appear. Instead, it will show "Import", as if the message was not already imported. If I try to import and click "OK", it will take me to a blank page.** **Related question:** In our use case, we would like to activate the option "Import emails automatically" only to relate the messages automatically with the sender's contact. The automatic assign to admin user is useless for us. In previous versions, the emails would relate to the sender's contact without the need to activate "Import automatically". Since v7.10.9, the message needs to be imported in order to relate to the contact. Would it be another bug? Or it's the default behavior? #### Expected Behavior The messages imported automatically should show the option "Edit" in Actions menu, instead of "Import". #### Actual Behavior Actions menus show "Import" as if the message was not already imported. When importing, it shows a blank page and it will not change the user assigned to or the contact related to. #### Possible Fix Unknown #### Steps to Reproduce 1. Create a group email account 2. For this account, activate "Import emails automatically" 3. After an email was received and imported, open it 4. In actions menu should be "Edit" instead of "import" 5. Importing takes the user to a blank page #### Some logs ``` Mon Oct 22 17:45:59 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] Email ID is Empty Mon Oct 22 17:46:01 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] Request ssl value not found. Mon Oct 22 17:46:01 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] Saving error level. Try to remove the error_reporting() function from your code. Mon Oct 22 17:46:01 2018 [14162][1][WARN] There is no any workflow to run Mon Oct 22 17:46:02 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][ERROR] Pop error level. Try to remove the error_reporting() function from your code. Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][ERROR] fromUser: Conversion of from user format d/m/Y H:i failed Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][ERROR] Unable to find relationship emails_email_templates Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] emails_email_templates for emails_email_templates failed to load Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] Failed to load relationship emails_email_templates while saving Emails Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] CaseUpdatesHook: saveEmailUpdate: Not a create case or wrong parent type Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] CSS File Dawn/yui.css not found Mon Oct 22 17:46:03 2018 [14139][224b09b1-a77f-f3a5-aa82-5ad76e47e9c6][WARN] Undefined index: server_unique_key Mon Oct 22 17:46:07 2018 [14162][1][WARN] Request ssl value not found. Mon Oct 22 17:46:07 2018 [14162][1][WARN] Requested folder is not defined Mon Oct 22 17:46:07 2018 [14162][1][WARN] Saving error level. Try to remove the error_reporting() function from your code. Mon Oct 22 17:46:08 2018 [14138][1][WARN] CSS File Dawn/yui.css not found ``` #### Your Environment * SuiteCRM Version used: 7.10.9 * Browser name and version: Chrome Version 69.0.3497.100 (Build oficial) (64 bits) * Environment name and version: MySQL 5.7 , PHP 7.2-fpm * Operating System and version: Ubuntu 18.04
Author
Owner

@labcerouno commented on GitHub (Nov 2, 2018):

This error can only be replicated if the user has set a personal inbound account up and if the admin user has set a group account up.

In our use case, many users have the same mail account, which was a perfect case for using a group email account. But we had problems when setting the group account up (subject for a new issue). So I had to make a personal account for each user, even though all users used the same account. After setting up a personal account (which has exact the same data as the group account), the Email module shows the group account inbox correctly and I'm able to send messages properly.

If I activate "Import emails automatically" in the group account config, the list view on Email module will show the messages correctly. But when clicking an automatically imported message, the detail view will show the view for non imported messages.

On modules/Emails/EmailsController.php, line 635 I found the function action_DisplayDetailView, where there is a query that searches for the message from a certain mailbox in the table where imported messages are stored. In our case, it was searching for the personal mailbox, instead the group. The query result was empty and the message was treated as non imported.

If I only have group account without any personal account, I can't receive or send emails. If I have only personal accounts, I can't activate Import messages automatically. If I have both, it will not recognize the messages imported.

@labcerouno commented on GitHub (Nov 2, 2018): **This error can only be replicated if the user has set a personal inbound account up and if the admin user has set a group account up.** In our use case, many users have the same mail account, which was a perfect case for using a group email account. But we had problems when setting the group account up (subject for a new issue). So I had to make a personal account for each user, even though all users used the same account. After setting up a personal account (which has exact the same data as the group account), the Email module shows the group account inbox correctly and I'm able to send messages properly. If I activate "Import emails automatically" in the group account config, the list view on Email module will show the messages correctly. But when clicking an automatically imported message, the detail view will show the view for non imported messages. On `modules/Emails/EmailsController.php`, line 635 I found the function `action_DisplayDetailView`, where there is a query that searches for the message from a certain mailbox in the table where imported messages are stored. In our case, it was searching for the personal mailbox, instead the group. The query result was empty and the message was treated as **non imported**. If I only have group account without any personal account, I can't receive or send emails. If I have only personal accounts, I can't activate `Import messages automatically`. If I have both, it will not recognize the messages imported.
Author
Owner

@samus-aran commented on GitHub (Jan 4, 2019):

Hi @labcerouno We have applied a Fix Proposed to this issue. If you are able to test that would be much appreciated.

@samus-aran commented on GitHub (Jan 4, 2019): Hi @labcerouno We have applied a Fix Proposed to this issue. If you are able to test that would be much appreciated.
Author
Owner

@labcerouno commented on GitHub (Feb 9, 2019):

Thank you, @samus-aran. I'll be testing this, if yet relevant.

@labcerouno commented on GitHub (Feb 9, 2019): Thank you, @samus-aran. I'll be testing this, if yet relevant.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#3368
No description provided.