switch($this->message_type) {
case 'plain':
$result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding);
- $result .= sprintf("Content-Type: %s; charset=\"%s\"", $this->ContentType, $this->CharSet);
+ $result .= sprintf("Content-Type: %s; charset=%s", $this->ContentType, $this->CharSet);
break;
case 'attachments':
case 'alt_attachments':
$encoding = $this->Encoding;
}
$result .= $this->TextLine('--' . $boundary);
- $result .= sprintf("Content-Type: %s; charset = \"%s\"", $contentType, $charSet);
+ $result .= sprintf("Content-Type: %s; charset=%s", $contentType, $charSet);
$result .= $this->LE;
$result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding);
$result .= $this->LE;
$this->Body = $message;
$textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s','',$message)));
if (!empty($textMsg) && empty($this->AltBody)) {
- $this->AltBody = html_entity_decode($textMsg);
+ $this->AltBody = html_entity_decode($textMsg,ENT_COMPAT | ENT_HTML401, strtoupper($this->CharSet));
}
if (empty($this->AltBody)) {
$this->AltBody = 'To view this email message, open it in a program that understands HTML!' . "\n\n";
return $errorMsg;
}
}
-?>
\ No newline at end of file
+?>