Php.ini configuration, mail function, timezone settings incorretly set

Dear php coders, please kindly help me on how to set my php.ini file so as to make use of mail() function in the localhost, and also the configure the date-time functions to be able to display accurate dates irrespective of the timezone or location.

Please consider the error message below as regards mail() function in php5. Thank you

Warning: mail() [function.mail]: “sendmail_from” not set in php.ini or custom “From:” header missing in C:\wamp\www\dce\Accounts\confirmReg.php on line 45


<?php session_start();
//ob_start();
//include ("../db/usersTable.php");
$server="localhost";
$server_user="root";
$server_pass="";
$db_name="dce";
/*
$pword_error="Your passwords did not match.";
$name=$_POST['name'];
$uname=$_POST['uname'];
$pword=$_POST['pword'];
$email=$_POST['email'];
$con_pword=$_POST['con_pword'];
*/
$name=filter_var($_POST['name'], FILTER_SANITIZE_STRING);
$uname=filter_var($_POST['uname'], FILTER_SANITIZE_STRING);
$pword=filter_var($_POST['pword'], FILTER_SANITIZE_STRING);
$email=filter_var($_POST['email'], FILTER_SANITIZE_EMAIL);
$con_pword=filter_var($_POST['con_pword'], FILTER_SANITIZE_STRING);

$to=$email;
$from="info@dce.com";
$subject="User Registration Confirmation!";
$body=
"You have received this mail as a result of the registration process you initiated on our webpage. <br>
Kindly activate your email to start using your account. This activation link <a href='http://dce.com/user/email_activation.php'> " .session_id(). "</a> will expire in 15 minutes.";

if (empty($uname) || empty($name) || empty($pword) || empty($con_pword) || empty($email)) {
//echo "Invalid registration details.";
die("You must complete all fields!"); }
elseif($pword!=$con_pword) {
die("Unmatched Passwords: ".$pword_error); }
elseif (!$con=mysql_connect($server,$server_user,$server_pass)) {
die('Could not connect: ' . mysql_error()); }
elseif(!mysql_select_db($db_name, $con)) {
die("Could not connect to the database: " . mysql_error()); }
//elseif(mysql_query("SELECT uname,email FROM userslogin WHERE email='$email' ORDER BY email ASC")) {
elseif (mysql_num_rows(mysql_query("SELECT uname,email FROM userslogin WHERE email='$email' or uname='$uname' ORDER BY email ASC")) !== 0) {
//die("This user already exists."); }
	header("Location: useralreadyexistserror.php"); }

elseif(!mysql_query("INSERT INTO userslogin(name,uname,pword,email) VALUES('$name', '$uname', '$pword', '$email')")) {
die("Records could not be inserted: " . mysql_error()); }
elseif(!mail($to, $subject, $body, $from)) { //send a mail to the registrants.
die();
header ("Location: registerError.php");}
else {
//redirect the user either to the login page or create a user cookie and redirect to main page.
header("Location: ../Accounts/regSuccess.php");
}
mysql_close($con); //close connection
?>

Thank you all!