Index: branches/unlabeled/unlabeled-1.66.2/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r7696 -r7750 --- branches/unlabeled/unlabeled-1.66.2/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7696) +++ branches/unlabeled/unlabeled-1.66.2/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7750) @@ -940,12 +940,19 @@ return $this->Application->Phrase($root_phrase); } + /** + * Allows to attach file directly from email event template + * + * @param Array $params + */ function AttachFile($params) { - $email_object =& $this->Application->recallObject('kEmailMessage'); + $esender =& $application->recallObject('EmailSender'.(isset($params['special']) ? '.'.$params['special'] : '')); + /* @var $esender kEmailSendingHelper */ + $path = FULL_PATH.'/'.$params['path']; if (file_exists($path)) { - $email_object->attachFile($path); + $esender->AddAttachment($path); } }