想请教各位大大我的mail 问题
In XAMPP windows server 2008
不管是调php设定配mail()
或是用phpmailer 都不行
开始觉得是不是系统网络设定问题
telnet smtp.aa.bb 25 去 也会有回应
是防火墙要特别开哪个port 吗 我有试过进出全开 也没变 orz
帮我解决 愿意做个游戏网站回报
以下是我的code
<?php
require("./phpmailer/class.phpmailer.php");
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->Host = 'smtp.haha.tw';
$mailer->Port = 25;
$mailer->SMTPAuth = TRUE;
$mailer->Username = 'id@haha.tw';
$mailer->Password = 'yoyo';
$mailer->From = 'GGGGGG';
$mailer->FromName = 'fake';
$mailer->Body = 'hahaha';
$mailer->Subject = 'hehehe';
$mailer->AddAddress('ggggg@yahoo.com.tw');
if(!$mailer->Send()){
echo "Message was not sent<br/ >";
echo "Mailer Error: " . $mailer->ErrorInfo;
}
else{ echo "Message has been sent";}
?>
错误是:
SMTP Error: Could not connect to SMTP host. Message was not sent
Mailer Error: SMTP Error: Could not connect to SMTP host.
先谢谢大大回答