Questions about the PHP MAIL () function

Source: Internet
Author: User
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.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.