From 66a4d9278df8778451d440b053ab18af25c18a97 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 4 Jan 2019 15:36:42 +0000 Subject: [PATCH] Further cases of case-insensitive checking for "send test email" in mailings --- api/v3/Mailing.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 73eabba477..a31641730a 100644 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -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') @@ -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, ); -- 2.25.1