When two contacts, Contact A and Contact B have the same email address, if Contact A is deleted then Contact B is incorrectly excluded from mailings, does not receive emails
When two contacts, Contact A and Contact B have the same email address, if Contact A is deleted then Contact B is incorrectly excluded from mailings, does not receive emails.
An error message is also displayed when previewing the receipients on the mailing, if the contact is in the first 50 contacts listed. Error message: {"count":0,"is_error":1,"error_message":"Expected one Contact but found 0"}
Reproduced on https://dmaster.demo.civicrm.org, CiviCRM 5.34-Alpha1
Related https://github.com/civicrm/civicrm-core/pull/18763
Steps to reproduce
- Create Contact A with email address abc@abc.com.au
- Create Contact B with email address abc@abc.com.au
- Create Smart Group C and define criteria which matches both Contact A and Contact B
- Verify that Contact A and Contact B are listed in Smart Group C
- Manually add Contact A to Smart Group C
- Delete Contact A
- Create a Mailing D and select Smart Group C as recipients
- The recipient count should be 1
- Click on the Recipients Count to preview the listing of recipients
- Note an error is shown in the pop-up: {"count":0,"is_error":1,"error_message":"Expected one Contact but found 0"}
- When the mailing is sent, an email will not be sent to Contact B which is incorrect. Contact B should receive the email.
Agileware Ref: CIVICRM-1638