From 7da8a3b6e863efd5ca2d8abdcf9c190e231d48d6 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 25 May 2022 10:07:28 +1200 Subject: [PATCH] Remove preferred_mail_format handling from legacy mailing --- CRM/Mailing/BAO/Mailing.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 83ddc6dad5..ef136a218b 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -1163,11 +1163,7 @@ ORDER BY civicrm_email.is_bulkmail DESC } $mailParams = $headers; - if ($text && ($test || $contact['preferred_mail_format'] == 'Text' || - $contact['preferred_mail_format'] == 'Both' || - ($contact['preferred_mail_format'] == 'HTML' && !array_key_exists('html', $pEmails)) - ) - ) { + if ($text) { $textBody = implode('', $text); if ($useSmarty) { $textBody = $smarty->fetch("string:$textBody"); @@ -1175,10 +1171,7 @@ ORDER BY civicrm_email.is_bulkmail DESC $mailParams['text'] = $textBody; } - if ($html && ($test || ($contact['preferred_mail_format'] == 'HTML' || - $contact['preferred_mail_format'] == 'Both' - )) - ) { + if ($html) { $htmlBody = implode('', $html); if ($useSmarty) { $htmlBody = $smarty->fetch("string:$htmlBody"); -- 2.25.1