Forum Moderators: coopster

Message Too Old, No Replies

Do I have my SMTP configuration setup correctly?

         

Flolondon

12:52 pm on Mar 15, 2006 (gmt 0)

10+ Year Member



what have i done wrong please
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = mail@localhost.com
<?
function checkOK($field)
{
if (eregi("\r",$field) ¦¦ eregi("\n",$field)){
die("Invalid Input!");
}
}

$name=$_POST['name'];
checkOK($name);
$email=$_POST['email'];
checkOK($email);
$comments=$_POST['comments'];
checkOK($comments);
$to="mail@localhost.com";
$message="$name just filled in your comments form. They said:\n$comments\n\nTheir e-mail address was: $email";
if(mail($to,"Comments From Your Site",$message,"From: $email\n")) {
echo "Thanks for your comments.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>

Flolondon

11:54 am on Mar 15, 2006 (gmt 0)

10+ Year Member



Warning: mail() [function.mail]: SMTP server response: 550 Address '<me@localhost>' not known here. in C:\XamppServer\xampp\htdocs\allbreads\sharonjones.php on line 18
There was a problem sending the mail. Please check that you filled in the form correctly.

please where do I change what....

coopster

2:26 pm on Mar 15, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Looks like your SMTP server requires authenitcation first.