Skip to content
Snippets Groups Projects
Unverified Commit 07973ecd authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub
Browse files

Merge pull request #21443 from demeritcowboy/test-fix-2

parents d0d0202f 97b745fe
Branches
Tags
No related merge requests found
......@@ -375,7 +375,8 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate {
// when we likely have the contact id. OTOH people probably barely
// use preferredMailFormat these days - the good fight against html
// emails was lost a decade ago...
$preferredMailFormat = Email::get(FALSE)->addWhere('email', '=', $params['toEmail'])->addSelect('contact_id.preferred_mail_format')->execute()->first()['contact_id.preferred_mail_format'];
$preferredMailFormatArray = Email::get(FALSE)->addWhere('email', '=', $params['toEmail'])->addSelect('contact_id.preferred_mail_format')->execute()->first();
$preferredMailFormat = $preferredMailFormatArray['contact_id.preferred_mail_format'] ?? 'Both';
if ($preferredMailFormat === 'HTML') {
$params['text'] = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment