首頁  >  文章  >  後端開發  >  php mail()解决方法

php mail()解决方法

WBOY
WBOY原創
2016-06-13 10:52:491083瀏覽

php mail()

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

$toaddress = [email protected]';
$subject = 'Feedback from web site';
$mailcontent = "Customer name: $name\n
Customer email: $emial\n
Customer comments:\n$feedback\n";
$fromaddress = 'From: [email protected]';

mail($toaddress, $subject, $mailcontent, $fromaddress);

?>

php.ini
[mail function]
 For Win32 only.
SMTP = smtp.qq.com
smtp_port = 25

 For Win32 only.
sendmail_from = [email protected]

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

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn