コード例 #1
0
ファイル: send.php プロジェクト: gudwin/extasy
 public static function setMailer($mailer)
 {
     if (is_null($mailer)) {
         $mailer = self::getDefaultMailer();
     }
     self::$mailer = $mailer;
 }
コード例 #2
0
ファイル: index.php プロジェクト: gudwin/extasy
 /**
  *   -------------------------------------------------------------------------------------------
  *   Отправляет письмо
  * @return
  *   -------------------------------------------------------------------------------------------
  */
 public function post($subject, $to, $content)
 {
     require_once LIB_PATH . 'email/controller/send.php';
     try {
         Email_Controller::send($to, $subject, $content);
         $this->addAlert('Ваше письмо отправлено');
         $this->jump('./index.php');
     } catch (Exception $e) {
         $this->addError('Ошибка отправки письма');
         $this->jump('./index.php');
     }
 }
コード例 #3
0
ファイル: forgot.php プロジェクト: gudwin/extasy
 public static function resetPassword($user)
 {
     self::validateLoginAttempts($user->email->getValue());
     $password = substr(md5(time()), 0, 8);
     $user->password = $password;
     $user->update();
     //
     $parseData = $user->getData();
     $parseData['password'] = $password;
     //
     $schema = CConfig::getSchema(self::EmailConfigName);
     $values = $schema->getValues();
     //
     Email_Controller::parseAndSend($user->email->getValue(), $values['newpassword_subject'], $values['newpassword_content'], $parseData);
 }
コード例 #4
0
ファイル: RegistrationTest.php プロジェクト: gudwin/extasy
 public function tearDown()
 {
     parent::tearDown();
     \Email_Controller::setMailer(null);
 }