/
/
home
/
u523034047
/
domains
/
jagdeeptradingcompany.com
/
public_html
Server: in-mum-web1112.main-hosting.eu (62.72.28.111)
You: 216.73.216.52
PHP 8.3.16
Dir:
/home/u523034047/domains/jagdeeptradingcompany.com/public_html
Edit:
/home/u523034047/domains/jagdeeptradingcompany.com/public_html/mail.php
<?php if($_SERVER["REQUEST_METHOD"] == "POST") { // Collect form data $name = htmlspecialchars($_POST['fname']); $email = htmlspecialchars($_POST['email']); $phone = htmlspecialchars($_POST['tel']); $subject = htmlspecialchars($_POST['text-798']); $role = htmlspecialchars($_POST['menu-756']); $message_content = htmlspecialchars($_POST['message']); // Stop execution before sending mail (for testing only) // exit; // Recipient email $to = "singhrandhawa587@gmail.com"; $mail_subject = "New Contact Form Website: " . $subject; $body = "Name: $name\n"; $body .= "Email: $email\n"; $body .= "Phone: $phone\n"; $body .= "Role: $role\n"; $body .= "Message: $message_content\n"; $headers = "From: info@jagdeeptradingcompany.com\r\n"; $headers .= "Cc: info@jagdeeptradingcompany.com\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=UTF-8\r\n"; if(mail($to, $mail_subject, $body, $headers)) { echo "Message sent successfully!"; } else { echo "Failed to send message. Please try again later."; } } else { echo "Invalid request."; } ?>
Ukuran: 1.2 KB