Example #1
0
 function sendRegistrationMail(UserModel $user_model, $password = null)
 {
     if (true || !Project::isLocalhost()) {
         $request = Project::getRequest();
         $mailer = new PHPMailer();
         $view = new MailTemplateView();
         $info = array();
         $info['login_name'] = $user_model->login;
         $info['password'] = $password;
         $info['registration_url'] = $request->createUrl('Index', 'Index');
         $info['support_email'] = $this->getParam('support_mail');
         $view->Registration($info);
         $mailer->CharSet = "utf-8";
         $mailer->From = $info['support_email'];
         $mailer->FromName = "Next24.ru";
         $mailer->Subject = "Регистрация на сайте Next24.ru";
         //$mailer->Subject = "Next24.ru";
         //$mailer->Body = $view -> parse();
         $mailer->Body = "Вы успешно зарегистрировались на сайте Next24.ru <br/> Login - " . $info['login_name'] . "<br/><hr/> e-mail поддержки: " . $info['support_email'];
         $mailer->IsHTML(true);
         $mailer->AddAddress($user_model->email, $user_model->last_name . " " . $user_model->first_name . " " . $user_model->middle_name);
         $bResult = $mailer->Send();
     }
 }