function email($reqNo){
//Database Configurations
$host = "some.url";
$username = "someuser";
$pass = "xxxxxx";
$db = "mydatabase_db";
//Customer Configurations
$cName = null;
$cEmail = null;
$DBConnect = @mysqli_connect($host, $username, $pass, $db) or die
("<p>Unable to connect to the database server.</p>". "<p>Error code ". mysqli_connect_errno().": ". mysqli_connect_error()). "</p>";
$SQLString = "SELECT name, email FROM Customer WHERE cust_no = '" .getInfor("cno"). "'";
$queryResult = @mysqli_query($DBConnect, $SQLString) or die
("<p>Unable to query the $TableName table.</p>"."<p>Error code ". mysqli_errno($DBConnect). ": ".mysqli_error($DBConnect)). "</p>";
$row = mysqli_fetch_row($queryResult);
while ($row) {
$cName = $row[0];
$cEmail = $row[1];
$row = mysqli_fetch_row($queryResult);
}
mysqli_close($DBConnect);
// Email Information Configurations
$pdate = date("Y-m-d", strtotime(getInfor("p_date")));
$ptime = date("H:i:s", strtotime(getInfor("p_time")));
$to = $cEmail;
$header = "From: admin@shiponline.com";
$subject = "Shipping Request with ShipOnline";
$message = "Dear $cName, Thank you for using ShipOnline! Your request number is $reqNo. "
."The cost is " .calCost(). ". We will pick-up the item at $ptime on $pdate.";
// Send Email
mail($to, $subject, $message, $header);
}
This function is execute without any errors display.
But I am just couldn't get the mail from it.
Am I missing something on that?
P/S: The email of the receipent is myself.