File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/redbuttonresorts.com/mail.php
Back
<?php error_reporting(0); // Only process POST reqeusts. if ($_SERVER["REQUEST_METHOD"] == "POST") { // Get the form fields and remove whitespace. $name = strip_tags(trim($_POST["name"])); $email = filter_var(trim($_POST["email"]), FILTER_SANITIZE_EMAIL); $msg = trim($_POST["msg"]); // Set the recipient email address. // FIXME: Update this to your desired email address. $to = "info@naturebloom.in "; $subject = "Query Form From Website"; $headers = "From: $name\r\n"; $headers .= "CC: info@asiatech.in\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; // Build the email content. $email_content=' <div style="border:3px solid 98bc6c; width:80%;display:block;margin: 0px auto;"> <div> <span style="font-size:20pt;">Nature Bloom Resort - Contact Us</span><br /> <span style="color:#FCAF17;font-size:15pt;">Enquiry Detail From Your Website</span><br /> <table cellspacing="0" style="width:100%;height:200px;"><tr style="background-color: #97BB6A;color:#fff;"><td colspan="2">The details are as follows.</td></tr> <tr><td style="border:1px solid #000000;padding:5px;font-weight:bold;">Customer Name</td><td style="border:1px solid #000000;padding:5px;">'.$name.'</td></tr> <tr><td style="border:1px solid #000000;padding:5px;font-weight:bold;">Email</td><td style="border:1px solid #000000;padding:5px;">'.$email.'</td></tr> <tr><td style="border:1px solid #000000;padding:5px;font-weight:bold;">Message</td><td style="border:1px solid #000000;padding:5px;">'.$msg.'</td></tr> </table><br> Thank you<br /> <span style="color:green;"><a href="http://www.asiatech.in/">AsiaTech Inc</a></span> </div> </div>'; // Send the email. if (mail($to, $subject, $email_content, $headers)) { $previous = $_SERVER['HTTP_REFERER']; header("Refresh: 3;url=".$previous.""); echo "Thank You! Your Message has been sent.<br>"; echo "Your will be redirected back to previous page in 3 seconds.<br>"; echo "If you are not redirected yet <a href='".$previous."'>click here</a>."; } else { // Set a 500 (internal server error) response code. echo "Oops! Something went wrong and we couldn't send your message."; } } else { // Not a POST request, set a 403 (forbidden) response code. echo "There was a problem with your submission, please try again."; } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings