示例#1
0
 /**
  * @desc create Massmailer object and send mails
  */
 public function __construct()
 {
     $mail = new Enterprise_Massmailer('youtube');
     $result = self::_getUsers();
     if (is_array($result)) {
         $mail->sendAll($result);
     } else {
         # error log
         $result = date('Y-m-d H:i:s') . ';' . $result;
         $writer = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../datas/logs/errorlog.csv');
         $logger = new Zend_Log($writer);
         $logger->info($result);
     }
 }
示例#2
0
 /**
  * @desc create Massmailer object and send mails
  */
 public function __construct($interval, $type)
 {
     $scriptName = 'semaine-' . Zend_Registry::get('week') . $type;
     $mail = new Enterprise_Massmailer($scriptName);
     $result = self::_getUsers($interval, $type);
     if (is_array($result)) {
         $mail->sendAll($result);
     } else {
         # error log
         $result = date('Y-m-d H:i:s') . ';' . $result;
         $writer = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../datas/logs/errorlog.csv');
         $logger = new Zend_Log($writer);
         $logger->info($result);
     }
 }