Mailer.php
authorChris <chris@roojs.com>
Tue, 12 Nov 2013 08:58:36 +0000 (16:58 +0800)
committerChris <chris@roojs.com>
Tue, 12 Nov 2013 08:58:36 +0000 (16:58 +0800)
Mailer.php

index ab416da..4469661 100644 (file)
@@ -222,21 +222,19 @@ Content-Type: multipart/alternative; boundary=alt-$random_hash
 
 --alt-$random_hash--
 
---mixed-$random_hash
-Content-Type: {$this->attachments[0]['mimetype']}; name=\"{$this->attachments[0]['name']}\"
-Content-Transfer-Encoding: base64 
-Content-Disposition: attachment
-
-{$this->attachments[0]['file']}
+";
 
+foreach($this->attachments as $attch){
+$str .= "
 --mixed-$random_hash
-Content-Type: {$this->attachments[0]['mimetype']}; name=\"{$this->attachments[0]['name']}\"
+Content-Type: {$attch['mimetype']}; name=\"{$attch['name']}\"
 Content-Transfer-Encoding: base64 
 Content-Disposition: attachment
 
-{$this->attachments[0]['file']}
---mixed-$random_hash--
+{$attch['file']}
 ";
+}
+            $str .= "--mixed-$random_hash--";
 
             $parts[2] = $str;
 //            --mixed-{t.random_hash}