[請益]phpmail和appserv的使用
請問一下我的appserv的內容資料夾似乎跟大大所說的不太一樣
我的php檔都是丟入www資料夾裡面自己新增的一個lby資料夾中
但是另一版的阿帕契似乎是apache2/htdocs 裡面
那請問一下
我的phpmailer安裝在C:\AppServ\phpmailer 底下ok嗎
我的程式碼如下
<?php
require_once("C:/AppServ/phpmailer/class.phpmailer.php");
$mail=new PHPMailer();
$mail->IsSMTP();
$mail->Host="sun.cis.scu.edu.tw"; //可以本行自行設定SMTP
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "xxxxxx";// SMTP 使用者帳號
$mail->Password = "xxxxxxxxxxxxx";// SMTP 密碼
$mail->From='xxxxxxxx@sun.cis.scu.edu.tw';
$mail->FromName='king';
$mail->AddAddress('xxxxx@sun.cis.scu.edu.tw');
$mail->Subject='test';
$mail->Body='testtesttest';
if($mail->Send()){
echo 'ok';
}else{
echo 'fail';
}
?>
程式碼應該是沒錯吧
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.14.68.31
PHP 近期熱門文章
PTT數位生活區 即時熱門文章