Commit 29626daedb058edf1e61e3b648e291ddd00f7bb1
1 parent
ce59d585
ашкые
Showing
2 changed files
with
12 additions
and
17 deletions
Show diff stats
protected/controllers/AjaxStoFilterController.php
1 | 1 | <?php |
2 | - | |
2 | +require( dirname(__DIR__).'/extensions/phpmailer/PHPMailerAutoload.php'); | |
3 | 3 | class AjaxStoFilterController extends Controller |
4 | 4 | { |
5 | 5 | |
... | ... | @@ -9,19 +9,14 @@ class AjaxStoFilterController extends Controller |
9 | 9 | $phone = Yii::app()->request->getParam('phone'); |
10 | 10 | $email = Yii::app()->request->getParam('email'); |
11 | 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(); | |
12 | + $to = $email; | |
13 | + $subject = 'Расчет стоимости ТО'; | |
14 | + $message = $text.'<br>Имя:'.$name.'<br>Телефон:'. $phone.'<br>Email:'. $email; | |
15 | + $headers = 'From: webmaster@example.com' . "\r\n" . | |
16 | + 'Reply-To: webmaster@example.com' . "\r\n" . | |
17 | + 'X-Mailer: PHP/' . phpversion(); | |
18 | + | |
19 | + mail($to, $subject, $message, $headers); | |
25 | 20 | |
26 | 21 | } |
27 | 22 | ... | ... |
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> | |
93 | +<!--<div class="order-set">--> | |
94 | +<!-- <a href="#" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">Оформить заявку</a>--> | |
95 | +<!--</div>--> | |
96 | 96 | \ No newline at end of file | ... | ... |