Skip to content

Commit

Permalink
Merge pull request #1047 from compucorp/COMCL-856-fix-email-duplicate
Browse files Browse the repository at this point in the history
COMCL-856: Prevent sending repeating bulk mail for selected contacts
  • Loading branch information
olayiwola-compucorp authored Sep 26, 2024
2 parents 9b6e569 + 9e3d1f1 commit 276f0cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Civicase/Hook/ValidateForm/SendBulkEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private function getCaseRoleContacts(array $casesContactInfo) {
* @param array|int[] $contactIds
* Array with contact Ids.
*/
private function sendEmailForCase(CRM_Case_Form_Task_Email $form, int $caseId, array $contactIds) {
private function sendEmailForCase(CRM_Case_Form_Task_Email &$form, int $caseId, array $contactIds) {
$_GET['caseid'] = $_REQUEST['caseid'] = $caseId;
$form->_caseId = $caseId;
$form->_contactIds = $contactIds;
Expand All @@ -246,7 +246,7 @@ private function sendEmailForCase(CRM_Case_Form_Task_Email $form, int $caseId, a
}
}

$data['values']['Email']['to'] = implode(',', $toContactEmails);
$data['values']['Email']['to'] = $form->_submitValues['to'] = implode(',', $toContactEmails);

$form->submit($form->exportValues());
}
Expand Down

0 comments on commit 276f0cf

Please sign in to comment.