PHP MAIL () function issues
Include_once (' conn.php ');
$activationKey = Mt_rand (). Mt_rand (). Mt_rand (). Mt_rand (). Mt_rand ();
$username = mysql_real_escape_string ($_post[username]);
$password = mysql_real_escape_string ($_post[pwd]);
$email = mysql_real_escape_string ($_post[email]);
$sql = "INSERT into users (username, password, email, activationkey, status) VALUES
(' $username ', ' $password ', ' $email ', ' $activationKey ', ' verify ');
echo "an email had been sent to $_post[email] with an activation key. Please check the your mail to complete registration. ";
Send activation Email
$to = $_post[email];
Echo $to;
$subject = "hajin.com registration";
$message = "Welcome to our website!\r\ryou, or someone using your email address with completed registration at hajin.com. You can complete registration by clicking the following link:\rhttp.//www. Yourwebsite.com/verify.php? $activationKey \r\rif This is a error, ignore this e-mail and you'll be removed from our Maili ng list.\r\rregards,\ hajin.com Team ";
$headers = ' from:bigboylike@ sina.com '. "\ r \ n".
' Reply-to: [email protected] '. "\ r \ n".
' x-mailer:php/'. Phpversion ();
Mail ($to, $subject, $message, $headers);
?>
Hint error warning:mail () [Function.mail]: SMTP server response:503 5.5.2 need RCPT command. In E:\WEB\goo\yx.php on line 20 PHP Email
------Solution--------------------
Must be automatically logged in, Phpmailer is certainly one of the alternatives
------Solution--------------------
Can not be implemented for the implementation of the function, or to learn more about the relevant knowledge it, or will never be able to stay at which level.