Jump to content
  • 0

В чем проблема?


raptor-dm
 Share

Question

http://joxi.ru/RmzkGW1tzGyX2O

вот обработчик
 

<?php$request = json_decode(json_encode($_POST),true);$phone = $request['phone'];$email = $request['email'];$name = $request['name'];$type = $request['type'];$type2 = $request['type2'];$msg = $request['msg'];$size = $request['size'];$link = $request['link'];if ($request['subject']) {    $subject = $request['subject'];} else {    $subject = 'Эксперсс анализ сметы. Вам поступила заявка!';}// сообщение клиенту$headers = "Content-type: text/html; charset=UTF-8\r\n";$headers .= "From: \"Почтовый робот\" <ремонт-под-контролем.рф/>\r\n";$contactMessage = "<html><body style='background-color:#f3f3f3;padding:10px 20px;border:1px solid #666'>";$contactMessage .= "<h2>Вам поступила заявка!</h2>";$contactMessage .= "<p>Контакты этого обращения:</p>";$contactMessage .= "<p>Причина обращения: <strong>$subject</strong></p>";if(!empty($name)) $contactMessage .= "<p>Имя: <strong>$name</strong></p>";if(!empty($phone))$contactMessage .= "<p>Телефон: <strong>$phone</strong></p>";if(!empty($email))$contactMessage .= "<p>Email клиента: <strong>$email</strong></p>";if(!empty($type))$contactMessage .= "<p>Тип помещения: <strong>$type</strong></p>";if(!empty($type2))$contactMessage .= "<p>Тип ремонта: <strong>$type2</strong></p>";if(!empty($size))$contactMessage .= "<p>Размер помещения(м<sup>2</sup>): <strong>$size</strong></p>";if(!empty($msg))  $contactMessage .= "<p>Сообщение от клиента: <strong>$msg</strong></p>";if(!empty($link)) $contactMessage .= "<p style='color:#ddd'>Параметры клиента: <strong>$link</strong></p>";$contactMessage .= "</body></html>";$subject = 'Экспресс анализ сметы. '.$subject;//отправляем письмо для насmail('test@mail.ru', $subject, $contactMessage, $headers);// возращаем статус во фронтэндexit('Отправлено!');?>
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy