From ab0f580c8b5407474c482ea20ca668563385e816 Mon Sep 17 00:00:00 2001 From: Barbara Miller Date: Wed, 11 Nov 2015 17:20:02 -0800 Subject: [PATCH] CRM-17548 - Thank-you e-mail fails to include message template subject CRM-17548 - Thank-you e-mail fails to include message template subject, sends only default https://issues.civicrm.org/jira/browse/CRM-17548 --- CRM/Contribute/Form/Task/PDFLetterCommon.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/Task/PDFLetterCommon.php b/CRM/Contribute/Form/Task/PDFLetterCommon.php index 9e36d0db25..69e252e733 100644 --- a/CRM/Contribute/Form/Task/PDFLetterCommon.php +++ b/CRM/Contribute/Form/Task/PDFLetterCommon.php @@ -334,7 +334,6 @@ class CRM_Contribute_Form_Task_PDFLetterCommon extends CRM_Contact_Form_Task_PDF $defaults = array( 'toName' => $contact['display_name'], 'toEmail' => $contact['email'], - 'subject' => ts('Thank you for your contribution/s'), 'text' => '', 'html' => $html, ); @@ -343,6 +342,12 @@ class CRM_Contribute_Form_Task_PDFLetterCommon extends CRM_Contact_Form_Task_PDF $emails = array_keys($emails); $defaults['from'] = array_pop($emails); } + if (!empty($params['subject'])) { + $defaults['subject'] => $params['subject']; + } + else { + $defaults['subject'] => ts('Thank you for your contribution/s'); + } if ($is_pdf) { $defaults['html'] = ts('Please see attached'); $defaults['attachments'] = array(CRM_Utils_Mail::appendPDF('ThankYou.pdf', $html, $format)); -- 2.25.1