发邮件的问题,显示已发送,为什么收不到邮件呢?
issmtp(); // tell the class to use smtp
$mail->smtpauth = true; // enable smtp authentication
$mail->port = 25; // set the smtp server port
$mail->host = smtp.qq.com; // smtp server
$mail->username = wanglintao_1@qq.com; // smtp server username
$mail->password = 12345in; // smtp server password
$mail->issendmail(); // tell the class to use sendmail
$mail->addreplyto(name@domain.com,first last);
$mail->from = wanglintao_1@qq.com;
$mail->fromname = wanglingtao;
$to = wanglintao_1@163.com;
$mail->addaddress($to);
$mail->subject = first phpmailer message;
$mail->altbody = to view the message, please use an html compatible email viewer!; // optional, comment out and test
$mail->wordwrap = 80; // set word wrap
$mail->msghtml($body);
$mail->ishtml(true); // send as html
$mail->send()
echo message has been sent;
} catch (phpmailerexception $e) {
echo $e->errormessage();
}
?>
------解决方案--------------------
你看看你qq的smtp/pop3开通了吗?
------解决方案--------------------
在你的服务器上要有接收邮件的程序,看其是否运行
------解决方案--------------------
看看服务器邮件发送的log 通常在/var/log/maillog
------解决方案--------------------
探讨
$mail->host = smtp.qq.com; // smtp server
$mail->username = wanglintao_1@qq.com; // smtp server username
$mail->password = 12345in; // smtp server password
==============================
请问……
------解决方案--------------------
换个126,gmail试试吧。估计qq不支持