File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/hotelaryavarta.in/mail.php
Back
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = $_POST['name']; $email = $_POST['email']; $city = $_POST['city']; $phone = $_POST['phone']; $message = $_POST['message']; $captcha = $_POST['g-recaptcha-response']; $secretKey = "6LcDh4UsAAAAAP2tN1_wdYoyCtzytw3jrNszrfpW"; $response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=$secretKey&response=$captcha"); $responseData = json_decode($response); if($responseData->success){ $to = "aryavartahotel@gmail.com, landamanlove@gmail.com"; $subject = "New Enquiry From Aryavart Hotel"; $body = " <h2>New Enquiry</h2> <table border='1' cellpadding='8' cellspacing='0' style='border-collapse:collapse;width:100%;'> <tr> <td><b>Name</b></td> <td>$name</td> </tr> <tr> <td><b>Email</b></td> <td>$email</td> </tr> <tr> <td><b>City</b></td> <td>$city</td> </tr> <tr> <td><b>Phone</b></td> <td>$phone</td> </tr> <tr> <td><b>Message</b></td> <td>$message</td> </tr> </table> "; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; $headers .= "From: Website Enquiry <info@yourdomain.com>" . "\r\n"; $headers .= "Reply-To: $email" . "\r\n"; $mail = mail($to,$subject,$body,$headers); if($mail){ header("Location: thank-you.php"); exit; }else{ echo "Mail not sent"; } }else{ echo "Captcha verification failed"; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings