----------------------------------------
* CRM-13407: View CiviMail Mailings - page should include an HTML title if one isn't provided in the message body
http://issues.civicrm.org/jira/browse/CRM-13407
TRUE, $details, $attachments
);
+ $title = NULL;
if (isset($this->_mailing->body_html)) {
+
$header = 'Content-Type: text/html; charset=utf-8';
$content = $mime->getHTMLBody();
+ if (strpos($content, '<head>') === FALSE && strpos($content, '<title>') === FALSE) {
+ $title = '<head><title>' . $this->_mailing->subject . '</title></head>';
+ }
}
else {
$header = 'Content-Type: text/plain; charset=utf-8';
if ($print) {
header($header);
+ print $title;
print $content;
CRM_Utils_System::civiExit();
}