One day this function does not work anymore. I was told somebody submitted the info., and I haven't received any email.
I checked it myself. I found that "Your info. has been sent successfully" is shown, but I never got the email.
By the way, how to check if the smpt in linux is working. Thank you.
Below code is part of
Code: Select all
contact. php
<?
ob_start();
include('Constant.php');
session_save_path ($s_Save_Path);
session_start();
?>
...
...
<? if ($filled == "contact") {
$subject = "Online Survey";
$mailbody = "========== Survey ==========\n".
"Name: $name\n".
"Email: $email\n".
"Tel: $tel\n".
"Fax: $fax\n".
"========== Content ===========\n".
"$content".
"\n=========================================";
$headers .= "From: $name <$email>\n";
$headers .= "Reply-To: $email\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "Return-Path: <$email>\n"; // Return path for errors
if (mail("$c_AdminEmail", "$subject", "$mailbody", "$headers")){
$sysmsg = "Your info. has been sent successfully";
} else {
$sysmsg = "Server Error ";
}
?>...
...
Code: Select all
$s_Save_Path = "/usr/local/apache/htdocs/skilltest/sessionfile";
$DBserver = "localhost";
$DBuser = "root";
$DBpw = "";
$DBname = "WCPSPE";
$DB_Path = "DB/";
$genGraph = "/usr/local/apache/htdocs/skilltest/";
$reportFolder = "/usr/local/apache/htdocs/reportFolder";
$displayReportFolder = "../reportFolder";
$skilltestFolder = "../skilltest/";
$c_AdminEmail = 'my@myemail.com';