protected function reportError($message) { $from = CoreConfig::get('Environment', 'errorEmailSender'); $listTo = array(CoreConfig::get('Environment', 'errorEmailRecipient')); $listCC = array(); $lang = CoreConfig::get('CoreLangs', 'defaultLangCMS'); $subject = CoreConfig::get('Environment', 'websiteName') . ' - ' . DictForCMS::get($lang, 'garbageCollectorFailure'); $content = DictForCMS::get($lang, 'garbageCollectorFailure') . ":\n" . $message; CoreServices2::getMail()->sendPlainText($from, $listTo, $listCC, $subject, $content); }
protected function sendPasswordRecoveryEmail(&$record) { $params = array('userRecord' => $record); $contentObj = new UserPasswordRecoveryEmailContent($params); $from = CoreConfig::get('Environment', 'passwordRecoveryEmailSender'); $listTo = array($record['userEmail']); $listCC = array(CoreConfig::get('Environment', 'errorEmailRecipient')); $subject = $contentObj->getSubject(); $content = $contentObj->getContent(); $attachments = $contentObj->getAttachments(); // CoreServices2::getMail()->sendHTML($from, $listTo, $listCC, $subject, $content, $attachments); CoreServices2::getMail()->sendPlainText($from, $listTo, $listCC, $subject, $content, $attachments); }
protected function sendConfirmationEmail() { $contentParams = array('userRecord' => $this->record); $contentObj = new UserConfirmationEmailContent($contentParams); $from = CoreConfig::get('Environment', 'registrationEmailSender'); $listTo = array($this->record['userEmail']); $listCC = null; $subject = $contentObj->getSubject(); $htmlContent = $contentObj->getContent(); $attachments = $contentObj->getAttachments(); // CoreServices2::getMail()->sendHTML($from, $listTo, $listCC, $subject, $htmlContent, $attachments); CoreServices2::getMail()->sendPlainText($from, $listTo, $listCC, $subject, $htmlContent, $attachments); }