コード例 #1
0
ファイル: RecipientCC.php プロジェクト: knatorski/SMS
 /**
  * Sprawdza, czy adresy podane w $list widnieja na liscie adresow
  * deweloperskich
  *
  * @param array $list
  * @throws Logic_WebService_Mail_Exception
  * @return type
  */
 public function checkEmailOnWhiteList(array $list)
 {
     if (!empty($list)) {
         if (!is_object($this->_model)) {
             $this->_model = new MailWhitelist();
         }
         foreach ($list as $val) {
             if (!$this->_model->getRecordByMail($val)) {
                 throw new Logic_WebService_Mail_Exception('Proba wyslania e-maila testowego na adres e-mail nieobecny na whitelist: ' . $val, 416);
             }
         }
     }
     return true;
 }
コード例 #2
0
ファイル: Recipient.php プロジェクト: knatorski/SMS
 /**
  * @throws Logic_WebService_Mail_Exception
  * @return void
  */
 public function checkEmailOnWhiteList()
 {
     $model = new MailWhitelist();
     if (!$model->getRecordByMail($this->_getMail())) {
         throw new Logic_WebService_Mail_Exception('Proba wyslania e-maila testowego na adres e-mail nieobecny na whitelist: ' . $this->_mail, 416);
     }
 }