| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/KnowledgeBase/wp-content/themes/mrx/css/CH/register/php/ |
Upload File : |
<?php
ini_set( "display_errors" , "on");
error_reporting(E_ALL);
//echo mail("m.umairrazaq@gmail.com","test", "hell") ?"sent" :"error";
$errorMSG = "";
// NAME
$txtname ="name";
$txtemail = "text@info.com";
$txtmessage = "Hello";
$EmailTo = "m.umairrazaq@gmail.com";
$Subject = "New Message Received";
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $txtname;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $txtemail;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $txtmessage;
$Body .= "\n";
// send email
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: Sender <test@me.com> ' . "\r\n";
$headers .= "Reply-To: test@htmlbeans.com" . "\r\n";
$headers .= "X-Mailer: PHP/" . PHP_VERSION . "\r\n";
$success = mail($EmailTo, $Subject, $Body, $headers );
// redirect to success page
if ($success && $errorMSG == ""){
echo "success";
}else{
if($errorMSG == ""){
echo "Something went wrong :(";
print_r(error_get_last());
} else {
echo $errorMSG;
}
}
?>