public static function convertToInlineCss(PostRenderMessageContentEvent $objEvent)
 {
     if (Environment::getUrlBasename() != 'preview') {
         $arrInlineStylesheetContents = static::getStylesheetContents($objEvent->getMessage()->getLayout(), static::AVISOTA_CSS_MODE_INLINE);
         if (!empty($arrInlineStylesheetContents)) {
             $objEvent->setContent(DOM::convertToInlineCss($objEvent->getContent(), implode(' ', $arrInlineStylesheetContents)));
         }
     }
 }
 /**
  * Returns the html body as a string
  *
  * @return  string
  */
 public function getHtmlBody()
 {
     $strHtmlBody = parent::getHtmlBody();
     if ($this->getMessage()->convertPtoBr) {
         $strHtmlBody = NotificationCenterPlus::convertPToBr($strHtmlBody);
     }
     if ($strHtmlBody && $this->getMessage()->addStylesheets) {
         $strHtmlBody = NotificationCenterPlus::addHeaderCss($strHtmlBody, $this->getMessage());
         $strHtmlBody = DOM::convertToInlineCss($strHtmlBody, implode(' ', NotificationCenterPlus::getStylesheetContents($this->getMessage(), NotificationCenterPlus::CSS_MODE_INLINE)));
     }
     return $strHtmlBody;
 }