if(!empty($this->attachments)){
//if got a attachments
-
$header = $mime->headers($parts[1]);
+
+ if (isset($parts[1]['Content-Type'])) {
+ unset($parts[1]['Content-Type']);
+ }
+
if (!$isMime) {
if(preg_match('/text\/html/', $header['Content-Type'])){
$mime->addAttachment(
$attch['file'],
$attch['mimetype'],
- $attch['name'],
- false
+ (!empty($attch['name'])) ? $attch['name'] : '',
+ true
);
}