sorry for my inexperience in web development
I am trying to use the mail function. Apparently i dun think it help me to direct the mail over. instead. an error had been returned.
is anyone use the mail function before?
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for lawrence.tan@yahoo.com in c:\Inetpub\wwwroot\04\processfeedback.php on line 14
my source code is
Code: Select all
<?php
//create short variable names
$name=$_POST['name'];
$email=$_POST['email'];
$feedback=$_POST['feedback'];
$toaddress = 'lawrence.tan@yahoo.com'; //'feedback@example.com';
$subject = 'Feedback from web site';
$mailcontent = 'Customer name: '.$name."\n"
.'Customer email: '.$email."\n"
."Customer comments: \n".$feedback."\n";
$fromaddress = '127.0.0.1'; //'From: webserver@example.com';
mail($toaddress, $subject, $mailcontent, $fromaddress);
?>
<html>
<head>
<title>Bob's Auto Parts - Feedback Submitted</title>
</head>
<body>
<h1>Feedback submitted</h1>
<p>Your feedback has been sent.</p>
</body>
</html>Do i need to do anything at SMTP server? or i have to write the function for Mail()?