Last active
January 26, 2017 10:51
-
-
Save sharkyak/70f9e4b0d8d4273a9af2 to your computer and use it in GitHub Desktop.
mail.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$to = "[email protected]"; // адрес куда отправлять письмо | |
$subject = "Отправка формы с сайта агентства"; // заголовок письма | |
$redirect = "http://dev.ak-agency.ru/zhaluzi/thankyou.html"; // адрес страницы, на которую нужно перейти после отправки письма | |
foreach($_POST as $key => $value) | |
{ $fields .= $key.": ".$value." \r\n"; } | |
$message = $subject." \r\n".$fields; | |
$headers = "Content-type: text/plain; charset=utf-8 \r\n"; | |
mail($to, $subject, $message, $headers); | |
header('Location: '.$redirect); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$_POST = json_decode(file_get_contents('php://input'), true);
axios fix