CRM-19204: Contact-to-contact email attachments not working
authordeb.monish <monish.deb@webaccessglobal.com>
Wed, 10 Aug 2016 09:12:24 +0000 (14:42 +0530)
committerdeb.monish <monish.deb@webaccessglobal.com>
Wed, 10 Aug 2016 09:13:07 +0000 (14:43 +0530)
CRM/Core/BAO/File.php

index b6deb13ace499954fcc98701cae64f9632d8fde6..c2480ad9b8c23de8568b9e86a9babcf9ce70cbf5 100644 (file)
@@ -556,6 +556,12 @@ AND       CEF.entity_id    = %2";
         );
 
         CRM_Utils_File::formatFile($formValues, $attachName, $extraParams);
+
+        // set the formatted attachment attributes to $params, later used by
+        // CRM_Activity_BAO_Activity::sendEmail(...) to send mail with desired attachments
+        if (!empty($formValues[$attachName])) {
+          $params[$attachName] = $formValues[$attachName];
+        }
       }
     }
   }