From 511c57673c35b6bc3ee2817ef5060351e9df852e Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Thu, 12 Apr 2018 12:19:55 -0400 Subject: [PATCH] dev/financial#11 email invoice fails with validation error --- CRM/Contribute/Form/Task/Invoice.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CRM/Contribute/Form/Task/Invoice.php b/CRM/Contribute/Form/Task/Invoice.php index 9684891001..495bc32c9b 100644 --- a/CRM/Contribute/Form/Task/Invoice.php +++ b/CRM/Contribute/Form/Task/Invoice.php @@ -458,12 +458,9 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { 'PDFFilename' => $pdfFileName, ); - $fromEmail = CRM_Core_BAO_Email::getFromEmail(); - // from email address - if (isset($params['from_email_address'])) { - $fromEmailAddress = CRM_Utils_Array::value($params['from_email_address'], $fromEmail); - } + $fromEmailAddress = CRM_Utils_Array::value('from_email_address', $params); + // condition to check for download PDF Invoice or email Invoice if ($invoiceElements['createPdf']) { list($sent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams); -- 2.25.1