想請教各位大大我的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.
先謝謝大大回答