Navigation Menu

Skip to content

Commit

Permalink
Mime Type on HTML Emails
Browse files Browse the repository at this point in the history
Some email readers can not interpret HTML emails without the MIME-Version set on the email header.
  • Loading branch information
lapenz committed Oct 8, 2014
1 parent 0c3b9e4 commit b9251f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cake/libs/controller/components/email.php
Expand Up @@ -622,6 +622,7 @@ function _createHeader() {
} elseif ($this->sendAs === 'text') { } elseif ($this->sendAs === 'text') {
$headers['Content-Type'] = 'text/plain; charset=' . $this->charset; $headers['Content-Type'] = 'text/plain; charset=' . $this->charset;
} elseif ($this->sendAs === 'html') { } elseif ($this->sendAs === 'html') {
$headers['MIME-Version'] = '1.0';
$headers['Content-Type'] = 'text/html; charset=' . $this->charset; $headers['Content-Type'] = 'text/html; charset=' . $this->charset;
} elseif ($this->sendAs === 'both') { } elseif ($this->sendAs === 'both') {
$headers['Content-Type'] = 'multipart/alternative; boundary="alt-' . $this->__boundary . '"'; $headers['Content-Type'] = 'multipart/alternative; boundary="alt-' . $this->__boundary . '"';
Expand Down

0 comments on commit b9251f6

Please sign in to comment.