Jump to content

Recommended Posts

Hello.

Im new to this forum so go easy on me  :P

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:<contact@spinthatvinyl.co.uk> 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("contact@spinthatvinyl.co.uk", $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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.