Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E-mail from field completely wrong when replying via suitecrm. Valid also in 7.12.4 #9023

Open
maurizioaiello opened this issue Jan 30, 2021 · 4 comments
Labels
Area: Emails Issues & PRs related to all things regarding emails & email module Priority:Critical Issues & PRs that are critical; broken core functionality, fatal errors - there are no workarounds Type: Bug Bugs within the core SuiteCRM codebase

Comments

@maurizioaiello
Copy link

Issue

When I receive a mail from a customer, answering to that mail via mail module it happens that the From: Address is wrong.
It should be:
From: My_name myaddress@mydomain.com
Reply to: My_name myaddress@mydomain.com

instead it is:
From: Recipient_Name myaddress@mydomain.com
Reply to: Recipient_Name myaddress@mydomain.com

Expected Behavior

When answering to mail received from Mickey Mouse for example, and I reply, the recipient (Mickey Mouse) should see:
From: Mario Rossi mariorossi@mydomain.com
Reply to: Mario Rossi mariorossi@mydomain.com

Actual Behavior

Mickey Mouse receives:
From: Mickey Mouse mariorossi@mydomain.com
Reply to: Mickey Mouse mariorossi@mydomain.com

So When Mickey receives an e-mail from me, it seems that Mickey wrote the mail addressed to himself. If Mickey replies to the mail, I receive the answer of Mickey. But this obviously counter intuitive and wrong.

Possible Fix

Steps to Reproduce

On suitecrm receive a mail from user_A, then answer to that mail. Move to the user_A client, and then for example with thunderbird select "view message source" or view full header or similar in other mail clients, and have a look to the mail from: and reply to: record in the txt

Context

For me it is a very important issue. I stopped answering to customers via suitecrm because, it is bad that they see that their name is shown as the sender of an e-mail sent to themselves.

Your Environment

  • SuiteCRM Version used: Version 7.10.29 Sugar Version 6.5.25 (Build 344)
  • Browser name and version: safari 14.0.2, chrome 88.0.4324.96
  • Environment name and version (e.g. MySQL, PHP 7): 8.0.22-0ubuntu0.20.04.3, 7.2.34-9+ubuntu20.04.1+deb.sury.org+1
  • Operating System and version (e.g Ubuntu 16.04): ubuntu 20.04
@johnM2401 johnM2401 added Area: Emails Issues & PRs related to all things regarding emails & email module Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type: Bug Bugs within the core SuiteCRM codebase Priority:Critical Issues & PRs that are critical; broken core functionality, fatal errors - there are no workarounds and removed Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds labels Feb 2, 2021
@criterion9
Copy link

+1 also having this problem

@criterion9
Copy link

After trying to peek into the email related code and finding that 2 hours with code traversing tools was not sufficient to fully track down the root issue (seems related to a fix to where all outgoing emails were using the system email from_name several releases ago). In short, the entirety of email handling within v 7.10.x is an absolute mess and will likely not be completely fixable without a total rewrite IMO. I'm not sure if the v7.11.x versions are any better, does anyone know if the email handling is better?

As a blunt workaround we added a line to modules/Emails/EmailsController.php after the call to $this->ReplaceEmailVariables (around line 252):
unset($this->bean->from_addr_name);

This is not a permanent fix in any way and will remove all the "from name" blocks from sent emails so this may not be a good workaround where only a shared group email has been used with the "from name" switching based on the current user.

@maurizioaiello maurizioaiello changed the title E-mail from field completely wrong when replying via suitecrm E-mail from field completely wrong when replying via suitecrm. Valid also in 7.12.4 Jan 2, 2023
@maurizioaiello
Copy link
Author

Patch from MarcoBlancas works.
After changing the files, it is necessary to:

Quick repair and rebuild the database
delete cache/smarty/templates_c/* from suitecrm directory
perform the three operations: “Rebuild Javascript Languages”, “Rebuild JS grouping file”, “RepairJS files”

This has to be done until the patch will not be included into the main distribution

@maurizioaiello
Copy link
Author

Bug still present in suitecrm 8.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Emails Issues & PRs related to all things regarding emails & email module Priority:Critical Issues & PRs that are critical; broken core functionality, fatal errors - there are no workarounds Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

3 participants