Hey folks,
I am new to php coding and i have problem which has stumped me:
I am trying to create a feedback form using the following code:
HTML:
<BODY>
<form action="require_files/feedback.php" method = "post">
Name: <input type="text" name="username" size"30" />
<br><br>
Email: <input type="text" name="useraddr" size="30" />
<br><br>
<textarea name="comments" cols="30" rows="5"></textarea> <br />
<input type="submit" value="send form">
</form>
and using the following PHP code:
<?php
#php script to send prayer requests
$to = "
[email protected]";
$re = "testing website emails";
$msg = $_POST[comments];
mail($to, $re, $msg);
?>
<html>
<head>
</head>
<body>
thanks for your comments
<br><br>
</body>
</html>
But I keep getting te follwoing error:
Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
[email protected] in C:\Inetpub\wwwroot\FirstChurch\require_files\feedb ack.php on line 10
I am using IIS 5.1 (yes, yes I know apache would be better for type of thing!!) and i have enabled the php.ini file accordingly I think
php.ini:
; For Win32 only.
SMTP = localhost ; for Win32 only
sendmail_from= smtp.freeserve.com ; for Win32 only
; For Win32 only.
;sendmail_from =
[email protected]
Any ideas and suggestions will be much appreicated! Many thanks!
Morris