dev/financial#11 email invoice fails with validation error
authorBrian Shaughnessy <brian@lcdservices.biz>
Thu, 12 Apr 2018 16:19:55 +0000 (12:19 -0400)
committerdeb.monish <monish.deb@jmaconsulting.biz>
Fri, 13 Apr 2018 12:26:33 +0000 (17:56 +0530)
CRM/Contribute/Form/Task/Invoice.php

index 9684891001a4ea20454d667652007e253a75579c..495bc32c9baa9ff9f35544ada71c6bcb42596c2d 100644 (file)
@@ -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);