Skip to content
Permalink
Browse files

Mime Type on HTML Emails Fix

Some email readers can not interpret HTML emails without the MIME-Version set on the email header.
  • Loading branch information...
lapenz committed Oct 9, 2014
1 parent b9251f6 commit 7a00f7039eca21414ff778d39ce5ab3c7aad4a9f
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/libs/controller/components/email.php
@@ -617,7 +617,6 @@ function _createHeader() {
}
if (!empty($this->attachments)) {
$headers['MIME-Version'] = '1.0';
$headers['Content-Type'] = 'multipart/mixed; boundary="' . $this->__boundary . '"';
} elseif ($this->sendAs === 'text') {
$headers['Content-Type'] = 'text/plain; charset=' . $this->charset;
@@ -627,7 +626,8 @@ function _createHeader() {
} elseif ($this->sendAs === 'both') {
$headers['Content-Type'] = 'multipart/alternative; boundary="alt-' . $this->__boundary . '"';
}
$headers['MIME-Version'] = '1.0';
$headers['Content-Transfer-Encoding'] = '7bit';
$this->header($headers);

0 comments on commit 7a00f70

Please sign in to comment.
You can’t perform that action at this time.