When filing an activity in CiviCase, there's the option "Send a Copy" to people listed in Case Roles. The email is sent correctly. However, when I "reply" to the email, the address of the sender is a default system email. Is there an option to have the "reply" email be the user that send the copy?
-
1would it be helpful if the email 'from' was an address which, when replied to, adds the reply to the Case? if so, this is possible, well at least having 'Inbound Emails' adding as Activities on to a Case by using 'caseid' in the subject – petednz - fuzion♦ Nov 9 '18 at 19:29
-
I think that might be a separate feature for a different problem. I just think that if a copy of the activity is sent to a user, replying to that email should correspond to the sender rather than the organization email address. Perhaps in some cases, the organization email is helpful but for the most part, my client doesn't have an organization email that gets checked frequently. – Kristine Nov 9 '18 at 19:51
It used to be the logged in user but I guess some people didn't want that and it was changed in https://issues.civicrm.org/jira/browse/CRM-20308
So it now uses the order listed there:
The Reported by Contact's email address
System Default From Address
Default Organization Contact email address
Logged in user
Personally I think logged in user makes more sense, and you could have privacy and also antispam problems with the Reported By address if it's not the org's domain.
It looks like there was a setting added to allow the old behavior, but it's not clear how it's supposed to work. It looks like to prevent using the Reported By contact you would uncheck the setting "Allow Mail to be sent from logged in contact's email address" found at Administer->system settings->Outbound Email, except then it would always return the system/org-wide email address. https://github.com/civicrm/civicrm-core/commit/4c981f371a6602cdfcda525895e0d0c40e9294d9#diff-be8afcc653a18926aabd2b40be8469f9
If you want a quick hack, try changing line 1407 in CRM/Case/BAO/Case.php from:
$receiptFrom = self::getReceiptFrom($activityId);
to
list($receiptUserName, $receiptUserEmail) = CRM_Contact_BAO_Contact_Location::getEmailDetails($userID);
$receiptFrom = "$receiptUserName <$receiptUserEmail>";