Skip to content

Commit

Permalink
Further cases of case-insensitive checking for "send test email" in m…
Browse files Browse the repository at this point in the history
…ailings
  • Loading branch information
martinh-pw committed Jan 4, 2019
1 parent 291dfe4 commit 66a4d92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v3/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ function civicrm_api3_mailing_send_test($params) {
$query = CRM_Utils_SQL_Select::from('civicrm_email e')
->select(array('e.id', 'e.contact_id', 'e.email'))
->join('c', 'INNER JOIN civicrm_contact c ON e.contact_id = c.id')
->where('e.email IN (@emails)', array('@emails' => $testEmailParams['emails']))
->where('LOWER(e.email) IN (@emails)', array('@emails' => $testEmailParams['emails']))
->where('e.on_hold = 0')
->where('c.is_opt_out = 0')
->where('c.do_not_email = 0')
Expand All @@ -650,7 +650,7 @@ function civicrm_api3_mailing_send_test($params) {
$emailDetail = array();
// fetch contact_id and email id for all existing emails
while ($dao->fetch()) {
$emailDetail[$dao->email] = array(
$emailDetail[strtolower($dao->email)] = array(
'contact_id' => $dao->contact_id,
'email_id' => $dao->id,
);
Expand Down

0 comments on commit 66a4d92

Please sign in to comment.