[請益] 有關PHPmailer的寫法還有設定問題
請問一下
我php是安在阿帕契裡面
把phpmailer安裝在阿帕企的目錄下面之後
我把php.in內的 windows那邊
includ_path後的路進改成我安裝phpmailer的路徑
include_path = " .;c:\AppServ\phpmailer
這樣
然後我程式碼是
<php?
require("c:\AppServ\phpmailer\class.phpmailer.php"); // 路徑請自訂
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "smtp.mail.yahoo.com.tw"; // SMTP 伺服器位址 SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "yahoo帳號"; // SMTP 帳號 SMTP username
$mail->Password = "yahoo密碼"; // SMTP 密碼 SMTP password
$mail->From = "xxxxxxxxxxx@yahoo.com.tw"; // 寄件者信箱
$mail->FromName = "king"; // 寄件者名稱
$mail->AddAddress("xxxxxxxxxxx@yahoo.com.tw"); // 收件者 optional name
$mail->AddReplyTo("",""); // 指定回覆地址與標題
$mail->WordWrap = 50; // set word wrap
$mail->IsHTML(true); // send as HTML
$mail->Subject = "fuckyou1111111111111111111111"; // 信件標題
$mail->Body = "有收到嗎收到嗎收到嗎收到嗎收到嗎收到嗎收到嗎收到嗎收到嗎";
if(!$mail->Send())
{
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
?>
這樣應該是沒寫錯吧@@?
可是沒收到信...
再次請教....拜託了
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.14.68.31
→
10/27 16:46, , 1F
10/27 16:46, 1F
→
10/27 16:47, , 2F
10/27 16:47, 2F
→
10/27 16:47, , 3F
10/27 16:47, 3F
→
10/27 16:48, , 4F
10/27 16:48, 4F
→
10/27 16:49, , 5F
10/27 16:49, 5F
→
10/27 16:49, , 6F
10/27 16:49, 6F
→
10/27 16:49, , 7F
10/27 16:49, 7F
→
10/27 16:50, , 8F
10/27 16:50, 8F
→
10/27 16:51, , 9F
10/27 16:51, 9F
→
10/27 16:51, , 10F
10/27 16:51, 10F
→
10/27 17:06, , 11F
10/27 17:06, 11F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章