Last active
November 13, 2015 14:31
-
-
Save namontec/3a7ba34d1bf2d3449ae3 to your computer and use it in GitHub Desktop.
ajax send 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 | |
$recepient = "[email protected]"; | |
$sitename = "site.ru"; | |
$service = trim($_POST["formInputService"]); | |
$name = trim($_POST["formInputName"]); | |
$email = trim($_POST["formInputEmail"]); | |
$tel = trim($_POST["formInputTel"]); | |
$text = trim($_POST["formInputComment"]); | |
$message = "Услуга: $service \n\nИмя: $name \nТелефон: $tel \n\nКомментарий: $text"; | |
$pagetitle = "Новая заявка с сайта \"$sitename\""; | |
mail($recepient, $pagetitle, $message, "Content-type: text/plain; charset=\"utf-8\" \nFrom: $name <$email>"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment