Пример #1
0
 /**
  * Returns class instance
  *
  * @return BOL_MailService
  */
 public static function getInstance()
 {
     if (!isset(self::$classInstance)) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
Пример #2
0
 public function mailQueueProcess()
 {
     // Send mails from mail queue
     BOL_MailService::getInstance()->processQueue();
 }
Пример #3
0
 public function getEmailDomain()
 {
     return $this->maliService->getEmailDomain();
 }
Пример #4
0
 public function onUserUnregisterClearMailQueue(OW_Event $event)
 {
     $params = $event->getParams();
     $userId = (int) $params['userId'];
     BOL_MailService::getInstance()->deleteQueuedMailsByRecipientId($userId);
 }
Пример #5
0
 public function ajaxSmtpTestConnection()
 {
     if (!OW::getRequest()->isAjax()) {
         throw new Redirect404Exception();
     }
     try {
         $result = BOL_MailService::getInstance()->smtpTestConnection();
     } catch (LogicException $e) {
         exit($e->getMessage());
     }
     if ($result) {
         $responce = OW::getLanguage()->text('admin', 'smtp_test_connection_success');
     } else {
         $responce = OW::getLanguage()->text('admin', 'smtp_test_connection_failed');
     }
     exit($responce);
 }