PhpMAIL () functions

Source: Internet
Author: User
PhpMAIL () function question & lt ;? Phpinclude_once ('Conn. php '); $ activationKey & nbsp ;=& nbsp; & nbsp; mt_rand () & nbsp ;. & nbsp; mt_rand () & nbsp ;. & nbsp; mt_rand () & nbsp ;. & php MAIL () function problems

Include_once ('Conn. php ');
$ ActivationKey = 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 has been sent to $ _ POST [email] with an activation key. Please check your mail to complete registration .";
// Send activation Email
$ To = $ _ POST [email];
Echo $;
$ Subject = "hajin.com Registration ";
$ Message = "Welcome to our website! \ R \ rYou, or someone using your email address, has 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 an error, ignore this email and you will be removed from our mailing list. \ r \ rRegards, \ hajin.com Team ";
$ Headers = 'from: bigboylike @ sina.com '. "\ r \ n ".
'Reply-To: bigboylike@sina.com '. "\ r \ n ".
'X-Mailer: PHP/'. phpversion ();
Mail ($ to, $ subject, $ message, $ headers );
?>

Error message: 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 --------------------
You must log on automatically. PHPMAILER is certainly one of the alternatives.
------ Solution --------------------
It cannot be implemented to implement the function. you need to know more about it, or you can only stay at what level.

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.