Merge pull request #6394 from colemanw/CRM-14599
[civicrm-core.git] / CRM / Mailing / Page / Preview.php
index cc615381aff5555b552d91bd047233d52b7fc60f..7b96ff1cfd6878c59211b22cef05ccc5d208bf8b 100644 (file)
@@ -92,11 +92,11 @@ class CRM_Mailing_Page_Preview extends CRM_Core_Page {
     );
 
     if ($type == 'html') {
-      header('Content-Type: text/html; charset=utf-8');
+      CRM_Utils_System::setHttpHeader('Content-Type', 'text/html; charset=utf-8');
       print $mime->getHTMLBody();
     }
     else {
-      header('Content-Type: text/plain; charset=utf-8');
+      CRM_Utils_System::setHttpHeader('Content-Type', 'text/plain; charset=utf-8');
       print $mime->getTXTBody();
     }
     CRM_Utils_System::civiExit();