Hey
I keeping getting this error when sending users e-mails after registration,
You have successfully Registered
Warning: mail() [function.mail]: SMTP server response: 501 SYNTAX ERROR IN PARAMETERS OR ARGUMENTS in C:\wamp\www\register.php on line 57
Your information has been mailed to your email address.
The email nevers gets to the users inbox, I am using my AOL smtp as the server below is my PHP.ini file details
[mail function]
; For Win32 only.
SMTP = smtp.aol.com
smtp_port = 25
; For Win32 only.
;sendmail_from = mzshah45@aol.com
line 57 refers to my register php and this is shown below
<?
//Database Information
$dbhost = "localhost";
$dbname = "dbms";
$dbuser = "**";
$dbpass = "**";
//Connect to database
mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());
mysql_select_db($dbname) or die(mysql_error());
$name = $POST['name'];
$email = $POST['email'];
$username = $POST['username'];
$password = md5($POST['password']);
$checkuser = mysql_query("SELECT username FROM users WHERE username='$username'");
$username_exist = mysql_num_rows($checkuser);
if($username_exist > 0){
echo "I'm sorry but the username you specified has already been taken. Please pick another one.";
unset($username);
include 'registration.html';
exit();
}
$query = "INSERT INTO users (name, email, username, password)
VALUES('$name', '$email', '$username', '$password')";
mysql_query($query) or die(mysql_error());
mysql_close();
echo "You have successfully Registered";
$yoursite = ‘www.blahblah.com’;
$webmaster = ‘yourname’;
$youremail = ‘youremail’;
$subject = "You have successfully registered at $yoursite...";
$message = "Dear $name, you are now registered at our web site.
To login, simply go to our web page and enter in the following details in the login form:
Username: $username
Password: $password
Please print this information out and store it for future reference.
Thanks,
$webmaster";
\line 57 below\
mail($email, $subject, $message, "From: $yoursite <$youremail>\nX-Mailer😛HP/" . phpversion());
echo "Your information has been mailed to your email address.";
?>
any help would be great as I have no idea what is causing it
thanks