D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
root
/
proc
/
self
/
root
/
home
/
shubmkcj
/
designpitara.com
/
Filename :
404-query.php
back
Copy
<?php session_start(); include 'dash/config.php'; $name = $_POST['txtname']; $email = $_POST['txtemail']; $message = $_POST['txtmessage']; // echo $txtname; die; $to = 'ravindra@designpitara.com'; $from = 'contact@designpitara.com'; $fromName = 'DesignPitara'; $subject = "DesignPitara Enquery"; $htmlContent = ' <html> <head> <title>Welcome to DesignPitara</title> </head> <body> <h2>404 Form Query</h2> <table cellspacing="0" style="border: 2px dashed #FB4314; width: 100%;"> <tr> <th>Name:</th><td>'.$name.'</td> </tr> <tr style="background-color: #e0e0e0;"> <th>Email:</th><td>'.$email.'</td> </tr> <tr> <th>Message:</th><td>'.$message.'</td> </tr> </table> </body> </html>'; // echo $htmlContent; die; // Set content-type header for sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // Additional headers $headers .= 'From: '.$fromName.'<'.$from.'>' . "\r\n"; // Send email if(mail($to, $subject, $htmlContent, $headers)){ $_SESSION['alert'] = "alert"; echo "<script>location.replace('index.php')</script>"; }else{ echo '<script>alert("Email has sent successfully.")</script>'; } ?>