Commit dc7900a3c3fa5fb826ca779099a46d9eaa4759a6
1 parent
8e4ec95c
01.06.16
Showing
4 changed files
with
16 additions
and
6 deletions
Show diff stats
common/widgets/Mailer.php
... | ... | @@ -10,6 +10,8 @@ class Mailer extends Widget{ |
10 | 10 | public $text; |
11 | 11 | public $subject; |
12 | 12 | public $type; |
13 | + public $params; | |
14 | + | |
13 | 15 | |
14 | 16 | public function init(){ |
15 | 17 | |
... | ... | @@ -24,11 +26,11 @@ class Mailer extends Widget{ |
24 | 26 | $mail->IsSMTP(); |
25 | 27 | |
26 | 28 | $mail->CharSet = 'UTF-8'; |
27 | - $mail->Username = "dockdep@gmail.com"; | |
28 | - $mail->Password = "k0l0b04eg@"; | |
29 | + $mail->Username = "adwords@artweb.ua"; | |
30 | + $mail->Password = "eks,ybcm5hfp"; | |
29 | 31 | $mail->SetFrom('dockdep@gmail.com'); |
30 | 32 | $mail->Subject = $this->subject; |
31 | - $mail->MsgHTML($this->render('test')); | |
33 | + $mail->MsgHTML($this->render($this->type, ['params' => $this->params])); | |
32 | 34 | $address = "dockdep@gmail.com"; |
33 | 35 | $mail->AddAddress($address); |
34 | 36 | // $mail->AddAddress($this->email); | ... | ... |
common/widgets/views/registration.php
frontend/controllers/RegController.php
... | ... | @@ -58,7 +58,15 @@ class RegController extends Controller |
58 | 58 | $modelLogin->username = $model->username; |
59 | 59 | $modelLogin->password = $model->password; |
60 | 60 | $modelLogin->login(); |
61 | - //Mailer::widget(['type' => 'registration', 'subject'=> 'Спасибо за регистрацию', 'email' => $model->username ]); | |
61 | + Mailer::widget( | |
62 | + ['type' => 'registration', | |
63 | + 'subject'=> 'Спасибо за регистрацию', | |
64 | + 'email' => $model->username, | |
65 | + 'params' => [ | |
66 | + 'name' => $model->username, | |
67 | + 'pass' => $model->password, | |
68 | + ] | |
69 | + ]); | |
62 | 70 | $this->redirect(['/iam']); |
63 | 71 | } |
64 | 72 | ... | ... |
frontend/views/basket/success.php