1

CiviMail has a great feature that finds intended recipients with the same email address prior to a mailing and prevents multiple emails getting sent to the same address. It seems similar to the Merge Address or Merge Household features in the Export action. Where in the code base is the CiviMail merge functionality located?

I'd like to create a similar function for CiviSMS and am looking for a starting point.

Based on the merge functions I've found in Export (https://github.com/civicrm/civicrm-core/blob/master/CRM/Export/BAO/Export.php), I've tried a few different searches on GitHub for the CiviMail merge function like "mergeemail" or "merge_email" but can't find anything yet.

1 Answer 1

1

Well I think the dirty work is done here in a sql statement using a group by clause. I don't know the code base at all however. I am on win7 and use the grepWin program.

..\civicrm\civicrm\CRM\Mailing\BAO\Mailing.php

Line 558

  // CRM-3975
  $groupBy = $groupJoin = '';
  if ($dedupeEmail) {
    $groupJoin = " INNER JOIN civicrm_email e ON e.id = i.email_id";
    $groupBy = " GROUP BY e.email ";
  }

CiviMail should have the option of not sending duplicate emails https://issues.civicrm.org/jira/browse/CRM-3975

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.