当前位置: 代码迷 >> PHP >> php mail()解决方法
  详细解决方案

php mail()解决方法

热度:75   发布时间:2016-04-28 23:25:44.0
php mail()
<?php

$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
  相关解决方案