Hi,
I am getting this error message:
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in d:\websites\resadmin\jobs-cafe\jobs-cafe.com\web\Auction\startauction.php on line 44
when the coding tries to email the user a confirmation letter. My server people told me I need to change the "local host" on the email bit to certain numbers, but i'm not sure how or where I do that on the page. I'm really not familiar with php, so any help would be much appreciated....I really don't see where I am meant to change the smtp email setting....
Thanks!
Carmen
Here is the page which throws the error:
<?php
require("date.php");
$id = rand(10000,1000000);
$name = $POST["name"];
$email = $POST["email"];
$pass1 = $POST["pass1"];
$pass2 = $POST["pass2"];
$item = $POST["item"];
$info = $POST["info"];
$ask = $POST["ask"];
$agree = $POST["agree"];
$no = "no";
$bid = "0";
if ($pass1 != $pass2) { showfailed(); die();}
else {$pass = $pass1;}
require("config.php");
$usertable="auction";
$yourfield1 = "id";
$yourfield2 = "postdate";
$yourfield3 = "name";
$yourfield4 = "email";
$yourfield5 = "password";
$yourfield6 = "item";
$yourfield7 = "info";
$yourfield8 = "ask";
$yourfield9 = "agree";
$yourfield10 = "confirm";
$yourfield11 = "bid";
mysql_connect($hostname,$username, $password) or die ("error");
mysql_select_db($dbname);
$sql = "INSERT INTO $usertable ($yourfield1,$yourfield2,$yourfield3,$yourfield4,$yourfield5,$yourfield6,$yourfield7,$yourfield8,$yourfield9,$yourfield10,$yourfield11) VALUES ('$id','$postdate','$name','$email','$pass','$item','$info','$ask','$agree','$no','$bid')";
$result = mysql_query($sql);
$body = "This Email is to confirm your Email Address and Posting.\n\n To confirm your Posting and Email, you must go to:\n\n http://www.$linkto/confirminfo.htm\n\nIn the form displayed you must input this ID Number:$id";
mail($email,"Please Confirm Your Account",$body,$headers);
print ("Thank You $name,<br>");
print ("<br><br><br>A Confirmation Email has been sent to:$email. You must reply to it in order to <br>have your ad submitted for review<br><br>");
print ("<br><br><br><a href=main.htm><b>Back to Main Page</b></a>");
function showfailed() {
?>
<html>
<body style="font-family: Arial" text="#FFFFFF" bgcolor="#FFFFFF" link="#00FFFF" vlink="#00FFFF">
<p align="center"><b><font size="4" color="#000000">Passwords Do not match. <br></font></b>
</html>
<?php
}
?>