/**
  * Returns class instance
  *
  * @return BOL_MailService
  */
 public static function getInstance()
 {
     if (!isset(self::$classInstance)) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
Example #2
0
 public function mailQueueProcess()
 {
     // Send mails from mail queue
     BOL_MailService::getInstance()->processQueue();
 }
Example #3
0
 public function getEmailDomain()
 {
     return $this->maliService->getEmailDomain();
 }
Example #4
0
 public function onUserUnregisterClearMailQueue(OW_Event $event)
 {
     $params = $event->getParams();
     $userId = (int) $params['userId'];
     BOL_MailService::getInstance()->deleteQueuedMailsByRecipientId($userId);
 }
Example #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);
 }