From f4e1609124bde1fe9f848235be7f8e607f45d505 Mon Sep 17 00:00:00 2001 From: Carlos Pacha Date: Wed, 17 Aug 2011 10:41:06 -0400 Subject: [PATCH] BUG 3910 Attachments to email messages added attachment option, at least one or more attachment file --- workflow/engine/classes/class.spool.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/workflow/engine/classes/class.spool.php b/workflow/engine/classes/class.spool.php index 87b6e9903..ca0f371ee 100755 --- a/workflow/engine/classes/class.spool.php +++ b/workflow/engine/classes/class.spool.php @@ -332,8 +332,11 @@ class spoolRun { $oPHPMailer->FromName = utf8_decode($this->fileData['from_name']); $oPHPMailer->Subject = utf8_decode($this->fileData['subject']); $oPHPMailer->Body = utf8_decode($this->fileData['body']); - if($this->fileData['attachments']) - $oPHPMailer->AddAttachment($this->fileData['attachments']); + if(is_array($this->fileData['attachments'])){ + foreach($this->fileData['attachments'] as $key => $fileAttach){ + $oPHPMailer->AddAttachment($fileAttach); + } + } foreach( $this->fileData['envelope_to'] as $sEmail ) { if( strpos($sEmail, '<') !== false ) { preg_match($this->longMailEreg, $sEmail, $matches);