--- class.phpmailer.php.orig 2008-09-23 12:29:52.000000000 -0700 +++ class.phpmailer.php 2008-09-23 12:31:50.000000000 -0700 @@ -271,9 +271,9 @@ */ 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'; } } @@ -979,7 +979,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();