Home > Backend Development > PHP Tutorial > php mail()解决方法

php mail()解决方法

WBOY
Release: 2016-06-13 13:09:50
Original
865 people have browsed it

php mail()

$name = $_POST['name'];
$emial = $_POST['email'];
$feedback = $_POST['feedback'];

$toaddress = '292200196@qq.com';
$subject = 'Feedback from web site';
$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

错误提示:
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

求解释

------解决方案--------------------
https://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template