Şuanki Dizin: /home/wwwdreamtechnolo/www/spmsolapur.org/vendor/php/ |
Şuanki Dosya : /home/wwwdreamtechnolo/www/spmsolapur.org/vendor/php/question-form-process.php |
<?php $EmailTo = "techlabpro7@gmail.com"; $Subject = "New Request for Question"; $errorMSG = ""; $name = $email = $message = $subject= null; // NAME if (empty($_POST["name"])) { $errorMSG = "Name is required "; } else { $name = $_POST["name"]; } // EMAIL if (empty($_POST["email"])) { $errorMSG .= "Email is required "; } else { $email = $_POST["email"]; } // MESSAGE if (empty($_POST["message"])) { $errorMSG .= "Message is required "; } else { $message = $_POST["message"]; } // prepare email body text $Body = null; $Body .= "<p><b>Name:</b> {$name}</p>"; $Body .= "<p><b>Email:</b> {$email}</p>"; $Body .= "<p><b>Message:</b> </p><p>{$message}</p>"; // send email $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: ' . $name . ' <' . $email .'>' . " \r\n" . 'Reply-To: '. $fromEmail . "\r\n" . 'X-Mailer: PHP/' . phpversion(); if($name && $email && $message){ $success = mail($EmailTo, $Subject, $Body, $headers ); }else{ $success = false; } if ($success && $errorMSG == ""){ echo "success"; }else{ if($errorMSG == ""){ echo "Something went wrong :("; } else { echo $errorMSG; } }
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4