TomBullock Posted September 2, 2007 Share Posted September 2, 2007 Hello. Im new to this forum so go easy on me Also if this is not the right place to post this, sorry. I am having problems with a contact script. When i press submit, i get this error: Warning: mail() [function.mail]: SMTP server response: 550 RCPT TO:<[email protected]> Relaying not allowed - please use SMTP AUTH in D:\Server\Test\sendeail.php on line 151 I amuse its asking me to enter something into the script that will authorise that my email account. Im dont have a clue how to do it though. Here is the full script: <?php $ip = $_POST['ip']; $httpref = $_POST['httpref']; $httpagent = $_POST['httpagent']; $visitor = $_POST['visitor']; $visitormail = $_POST['visitormail']; $notes = $_POST['notes']; $attn = $_POST['attn']; if (eregi('http:', $notes)) { die ("Do NOT try that! ! "); } if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) { echo "<h2>Please enter valid e-mail address.</h2>\n"; $badinput = "<h2>Contact form was not submitted.</h2>\n"; echo $badinput; die ("Go back! ! "); } if(empty($visitor) || empty($visitormail) || empty($notes )) { echo "<h2>Please fill in all fields.</h2>\n"; die ("Please go back."); } $todayis = date("l, F j, Y, g:i a") ; $attn = $attn ; $subject = $attn; $notes = stripcslashes($notes); $message = " $todayis [EST] \n Subject: $attn \n Message: $notes \n From: $visitor ($visitormail)\n Additional Info : IP = $ip \n Browser Info: $httpagent \n Referral : $httpref \n "; $from = "From: $visitormail\r\n"; mail("[email protected]", $subject, $message, $from); ?> Please could someone help me put this right? Many thanks. Tom Bullock. Link to comment https://forums.phpfreaks.com/topic/67662-php-contact-form-script/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.