diff options
-rw-r--r-- | it_mail.class | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/it_mail.class b/it_mail.class index 4033c06..3e56a08 100644 --- a/it_mail.class +++ b/it_mail.class @@ -276,7 +276,8 @@ function send($p = array()) foreach ($this->attachments as $attachment) { - $text .= "\n--$boundary\nContent-Type: {$attachment['mimetype']}; name=\"{$attachment['name']}\"\nContent-Transfer-Encoding: base64\nContent-ID: <{$attachment['cid']}>\nContent-Disposition: {$attachment['disposition']}; filename=\"{$attachment['name']}\"\n\n"; + $name = $this->header_escape($attachment['name']); + $text .= "\n--$boundary\nContent-Type: {$attachment['mimetype']}; name=\"$name\"\nContent-Transfer-Encoding: base64\nContent-ID: <{$attachment['cid']}>\nContent-Disposition: {$attachment['disposition']}; filename=\"$name\"\n\n"; $text .= chunk_split(base64_encode($attachment['data'])); } |