From: Brian Shaughnessy Date: Thu, 12 Apr 2018 16:19:55 +0000 (-0400) Subject: dev/financial#11 email invoice fails with validation error X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=511c57673c35b6bc3ee2817ef5060351e9df852e;p=civicrm-core.git dev/financial#11 email invoice fails with validation error --- 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);