Commit ce59d585aa4619e9850bd31c54ae4846b1f4c6ad
1 parent
1d497eea
ашкые
Showing
2 changed files
with
18 additions
and
4 deletions
Show diff stats
protected/controllers/AjaxStoFilterController.php
... | ... | @@ -8,7 +8,21 @@ class AjaxStoFilterController extends Controller |
8 | 8 | $name = Yii::app()->request->getParam('name'); |
9 | 9 | $phone = Yii::app()->request->getParam('phone'); |
10 | 10 | $email = Yii::app()->request->getParam('email'); |
11 | - print $text. ' '.$name.' '. $phone.' '. $email; | |
11 | + | |
12 | + Yii::import('application.extensions.phpmailer.JPhpMailer'); | |
13 | + $mail = new JPhpMailer; | |
14 | + $mail->IsSMTP(); | |
15 | + $mail->Host = 'smtp.gmail.com'; | |
16 | + $mail->SMTPAuth = true; | |
17 | + $mail->Username = 'dockdep@gmail.com'; | |
18 | + $mail->Password = 'k0l0b04eg'; | |
19 | + $mail->SetFrom('dockdep@gmail.com', 'Авто Лайв'); | |
20 | + $mail->Subject = 'Расчет стоимости ТО'; | |
21 | + $mail->AltBody = $text.'<br>Имя:'.$name.'<br>Телефон:'. $phone.'<br>Email:'. $email; | |
22 | + $mail->MsgHTML('<h1>JUST A TEST!</h1>'); | |
23 | + $mail->AddAddress('john.doe@otherdomain.com', 'John Doe'); | |
24 | + $mail->Send(); | |
25 | + | |
12 | 26 | } |
13 | 27 | |
14 | 28 | ... | ... |
protected/views/stoFilter/_priceList.php
... | ... | @@ -90,6 +90,6 @@ $count = count($fields); |
90 | 90 | </div> |
91 | 91 | |
92 | 92 | <div class="style_devider"></div> |
93 | -<!--<div class="order-set">--> | |
94 | -<!-- <a href="#" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">Оформить заявку</a>--> | |
95 | -<!--</div>--> | |
96 | 93 | \ No newline at end of file |
94 | +<div class="order-set"> | |
95 | + <a href="#" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">Оформить заявку</a> | |
96 | +</div> | ... | ... |