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

Closed
opened 2026-02-20 16:18:03 -05:00 by deekerman · 6 comments
Owner

Originally created by @maurizioaiello on GitHub (Jan 30, 2021).

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
Originally created by @maurizioaiello on GitHub (Jan 30, 2021). <!--- Provide a general summary of the issue in the **Title** above --> <!--- Before you open an issue, please check if a similar issue already exists or has been closed before. ---> <!--- If you have discovered a security risk please report it by emailing security@suitecrm.com. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. ---> #### 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 <!--- Include as many relevant details about the environment you experienced the bug in --> * 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
Author
Owner

@criterion9 commented on GitHub (Oct 18, 2021):

+1 also having this problem

@criterion9 commented on GitHub (Oct 18, 2021): +1 also having this problem
Author
Owner

@criterion9 commented on GitHub (Oct 29, 2021):

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.

@criterion9 commented on GitHub (Oct 29, 2021): 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.
Author
Owner

@maurizioaiello commented on GitHub (Jan 3, 2023):

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 commented on GitHub (Jan 3, 2023): 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
Author
Owner

@maurizioaiello commented on GitHub (Jan 6, 2023):

Bug still present in suitecrm 8.2.2

@maurizioaiello commented on GitHub (Jan 6, 2023): Bug still present in suitecrm 8.2.2
Author
Owner

@serhiisamko091184 commented on GitHub (Oct 4, 2024):

Hello @maurizioaiello,

Thanks for bringing this issue to our attention,

I tried to replicate the issue using the latest version of SuiteCRM 7 (7.14.5) and, I'm afraid I was not successful.
I tested both the Thunderbird Mail client and Google Chrome browser to check FROM/TO.

According to the last comment - the issue was present in SuiteCRM 8.2.2. We have just released the 8.7.0 version, I didn't manage to replicate the problem in there as well.

Have you been experiencing the same issue so far?

Thanks in advance!

Regards,
Serhii

@serhiisamko091184 commented on GitHub (Oct 4, 2024): Hello @maurizioaiello, Thanks for bringing this issue to our attention, I tried to replicate the issue using the latest version of SuiteCRM 7 (7.14.5) and, I'm afraid I was not successful. I tested both the Thunderbird Mail client and Google Chrome browser to check FROM/TO. According to the last comment - the issue was present in SuiteCRM 8.2.2. We have just released the 8.7.0 version, I didn't manage to replicate the problem in there as well. Have you been experiencing the same issue so far? Thanks in advance! Regards, Serhii
Author
Owner

@johnM2401 commented on GitHub (Aug 25, 2025):

Hey!

Thank you for raising this issue.

I've given this a try on the latest release, and I have not been able to replicate.

I recieve an Email from my local test email:

Image

I reply to this, which populates my From/To correctly:

Image

On the recieved emails, the Header has the correct To / From / Reply to addresses:

Image

I'm going to close this off for now.
However, if I have perhaps missed something or misunderstood the issue, please get in touch.
Or, if you are still experiencing this in the latest releases, please get in touch with this.

Thank you again!

@johnM2401 commented on GitHub (Aug 25, 2025): Hey! Thank you for raising this issue. I've given this a try on the latest release, and I have not been able to replicate. I recieve an Email from my local test email: <img width="532" height="91" alt="Image" src="https://github.com/user-attachments/assets/f6b9f80e-32a7-4d81-b651-192c82d31af5" /> I reply to this, which populates my From/To correctly: <img width="1264" height="93" alt="Image" src="https://github.com/user-attachments/assets/0abb3460-5cba-4536-9938-49d564d4cead" /> On the recieved emails, the Header has the correct To / From / Reply to addresses: <img width="526" height="74" alt="Image" src="https://github.com/user-attachments/assets/9c05c3a4-9814-43a8-b93c-49686434aa60" /> <br> I'm going to close this off for now. However, if I have perhaps missed something or misunderstood the issue, please get in touch. Or, if you are still experiencing this in the latest releases, please get in touch with this. Thank you again!
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#4479
No description provided.