Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21549

Standardise the contact name used in 'To: ' header of emails

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.28
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      CiviCRM currently uses lots of different formats for the contact name when creating an email and using the 'To: ' heading.

      This varies between the UI and what is actually sent; and may not be consistent between the two.

      My recommendation would be to use 'display name' consistently in the 'To:' header.

       

      Places:

      When creating an email to a contact (clicking on their email address on their contact record, and other places)

      In \CRM_Contact_Form_Task_EmailCommon::buildQuickForm - sort name is used, which is useful for finding contacts, but not consistent in the display.

       

      When an individual email to a contact is sent (when sending from the above form)

      No name is used in the 'To:' header. Only the email address. This is being set here:

      https://github.com/civicrm/civicrm-core/blob/4fe5b084839dd66b419287f67b6dd99fb67b9bc2/CRM/Contact/Form/Task/EmailCommon.php#L430

      And ending up here:

      https://github.com/civicrm/civicrm-core/blob/4fe5b084839dd66b419287f67b6dd99fb67b9bc2/CRM/Activity/BAO/Activity.php#L1475-L1477

       

      When a mailing is sent through CiviMail

      The display_name is used, and comes out in the headers.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              john John K.
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified