[請益]phpmail和appserv的使用

看板PHP作者 (baboo超人)時間17年前 (2008/11/03 13:51), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
請問一下我的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
文章代碼(AID): #193f5yem (PHP)
文章代碼(AID): #193f5yem (PHP)