--- class.phpmailer.php.orig 2008-11-08 15:23:04.000000000 -0200 +++ class.phpmailer.php 2009-12-04 10:49:52.000000000 -0200 @@ -278,9 +278,9 @@ */ public function IsHTML($bool) { if($bool == true) { - $this->ContentType = 'text/html'; + $this->ContentType = $this->is_html = 'text/html'; } else { - $this->ContentType = 'text/plain'; + $this->ContentType = $this->is_html = 'text/plain'; } } @@ -1005,7 +1005,12 @@ $result .= $this->EncodeString($this->Body, $this->Encoding); break; case 'attachments': - $result .= $this->GetBoundary($this->boundary[1], '', '', ''); + if ($this->is_html) { + $result .= $this->GetBoundary($this->boundary[1], '', $this->is_html, ''); + } + else { + $result .= $this->GetBoundary($this->boundary[1], '', '', ''); + } $result .= $this->EncodeString($this->Body, $this->Encoding); $result .= $this->LE; $result .= $this->AttachAll();