Phpmail () & lt ;? Php $ name $ _ POST [name]; $ emial $ _ POST [email]; $ feedback $ _ POST [feedback]; $ toaddress292200196@qq.com; $ subjectFeedbackfromwebsite; $ mailc php mail ()
$ Name = $ _ POST ['name'];
$ Emial = $ _ POST ['email '];
$ Feedback = $ _ POST ['feedback'];
$ Toaddress = '2017 @ qq.com ';
$ Subject = 'Feedback from website ';
$ Mailcontent = "Customer name: $ name \ n
Customer email: $ emial \ n
Customer comments: \ n $ feedback \ n ";
$ Fromaddress = 'from: 695565914@qq.com ';
Mail ($ toaddress, $ subject, $ mailcontent, $ fromaddress );
?>
Php. ini
[Mail function]
For Win32 only.
SMTP = smtp.qq.com
Smtp_port = 25
For Win32 only.
Sendmail_from = 695565914@qq.com
Error message:
Warning: mail () [function. mail]: SMTP server response: 503 Error: need EHLO and AUTH first! In D: \ wamp \ apache \ htdocs \ test \ processfeedback. php on line 14
Explanations
------ Solution --------------------
Https://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list