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

CiviContribute possible duplicate alert email being CC'd to related contacts

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.3.alpha
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      When a new organization contact is created via an online contribution form using the "On behalf of" functionality and civi detects a possible duplicate, it sends out a "CiviContribute Alert: Possible Duplicate Contact Record" email. In version 3.2.3 civi is CC'ing the contact who made the contribution on these administrative messages not only the administrator of the form.

      This appears to be happening in the block beginning at line 240 of v3.2.3's CRM/Contribute/BAO/ContributionPage.php where the related contact is being CC'd on contribution emails:

      // cc to related contacts of contributor OR the one who
      // signs up. Is used for cases like - on behalf of
      // contribution / signup ..etc
      if ( array_key_exists('related_contact', $values) ) {
      list( $ccDisplayName, $ccEmail ) =
      CRM_Contact_BAO_Contact_Location::getEmailDetails( $values['related_contact'] );
      $ccMailId = "{$ccDisplayName} <{$ccEmail}>";

      $values['cc_receipt'] = CRM_Utils_Array::value( 'cc_receipt' , $values ) ?
      ($values['cc_receipt'] . ',' . $ccMailId) : $ccMailId;

      // reset primary-email in the template
      $tplParams['email'] = $ccEmail;

      $tplParams['onBehalfName'] = $displayName;
      $tplParams['onBehalfEmail'] = $email;
      }

      The code for sending emails when $values['onbehalf_dupe_alert'] is set needs to either unset the CC and BCC fields or use the original $values['cc_receipt'] email so general users are not receiving this automatically generated admin message.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              jbertolacci jason bertolacci
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: