用phpmailer寄信,寄不出去,請問是mai … - Linux
By Olga
at 2010-03-09T16:35
at 2010-03-09T16:35
Table of Contents
※ [本文轉錄自 PHP 看板]
作者: knives () 看板: PHP
標題: [請益] 用phpmailer寄信,寄不出去,請問是mail server的問題嗎
時間: Tue Mar 9 16:35:03 2010
我現在用phpmailer寄信,本來是要用Gmail,可是怕被擋
所以又改回自己家的mail server是POSTFIX: mail.gxcity.com
我的php程式是這樣寫
$PHPmail= new PHPMailer(); //建立新物件
$PHPmail->IsSMTP(); //設定使用SMTP方式寄信
$PHPmail->PluginDir=S_ROOT.'./source/'; //設定使用SMTP方式寄信
$PHPmail->SetLanguage( 'zh', S_ROOT.'./source/phpmailer/language/' );
$PHPmail->Host =
($mail['gmail_server']!='') ? $mail['gmail_server'] : 'smtp.gmail.com'; //設定
SMTP主機
//$PHPmail->Host = $mail['gmail_server'];
$PHPmail->SMTPAuth = false;
//$PHPmail->SMTPSecure = "ssl";
$PHPmail->Username = $mail['gmail_auth_username']; //設定驗證帳號
$PHPmail->Password = $mail['gmail_auth_password']; //設定驗證密碼
$PHPmail->Port = $mail['gmail_port']; //設定SMTP埠位,預設為25埠。
$PHPmail->CharSet = "utf8"; //設定郵件編碼
$PHPmail->From = $mail['gmail_auth_username'].'@gmail.com'; //設定寄件者信
箱
$PHPmail->FromName = $mail['gmail_from_username']; //設定寄件者姓名
$PHPmail->SetFrom( $PHPmail->From,$PHPmail->FromName);
這樣寄的話,是可以正常送出
但是問題是,當我將$PHPmail->From 這一項改成
$mail['gmail_auth_username'].'@gxcity.com';
我看Log 檔是寫
NOQUEUE: reject: RCPT from unknown[xxx.xxx.xxx.xx]: 553 5.7.1
<[email protected]>: Sender address rejected: not logged in; from=<[email protected]>
請問這樣是 mail server那邊的設定問題嗎
又要怎麼修正
謝謝
--
◢██ ◣
◢ █
□︵□◥
◥o﹦◤◤ ㄤ ㄤ ㄤ 洨叮噹幫我實現~所有的~願望~~
● ㊣ ◣
--
作者: knives () 看板: PHP
標題: [請益] 用phpmailer寄信,寄不出去,請問是mail server的問題嗎
時間: Tue Mar 9 16:35:03 2010
我現在用phpmailer寄信,本來是要用Gmail,可是怕被擋
所以又改回自己家的mail server是POSTFIX: mail.gxcity.com
我的php程式是這樣寫
$PHPmail= new PHPMailer(); //建立新物件
$PHPmail->IsSMTP(); //設定使用SMTP方式寄信
$PHPmail->PluginDir=S_ROOT.'./source/'; //設定使用SMTP方式寄信
$PHPmail->SetLanguage( 'zh', S_ROOT.'./source/phpmailer/language/' );
$PHPmail->Host =
($mail['gmail_server']!='') ? $mail['gmail_server'] : 'smtp.gmail.com'; //設定
SMTP主機
//$PHPmail->Host = $mail['gmail_server'];
$PHPmail->SMTPAuth = false;
//$PHPmail->SMTPSecure = "ssl";
$PHPmail->Username = $mail['gmail_auth_username']; //設定驗證帳號
$PHPmail->Password = $mail['gmail_auth_password']; //設定驗證密碼
$PHPmail->Port = $mail['gmail_port']; //設定SMTP埠位,預設為25埠。
$PHPmail->CharSet = "utf8"; //設定郵件編碼
$PHPmail->From = $mail['gmail_auth_username'].'@gmail.com'; //設定寄件者信
箱
$PHPmail->FromName = $mail['gmail_from_username']; //設定寄件者姓名
$PHPmail->SetFrom( $PHPmail->From,$PHPmail->FromName);
這樣寄的話,是可以正常送出
但是問題是,當我將$PHPmail->From 這一項改成
$mail['gmail_auth_username'].'@gxcity.com';
我看Log 檔是寫
NOQUEUE: reject: RCPT from unknown[xxx.xxx.xxx.xx]: 553 5.7.1
<[email protected]>: Sender address rejected: not logged in; from=<[email protected]>
請問這樣是 mail server那邊的設定問題嗎
又要怎麼修正
謝謝
--
◢██ ◣
◢ █
□︵□◥
◥o﹦◤◤ ㄤ ㄤ ㄤ 洨叮噹幫我實現~所有的~願望~~
● ㊣ ◣
--
Tags:
Linux
All Comments
Related Posts
liveCD 桌面解析度問題
By Ursula
at 2010-03-08T19:51
at 2010-03-08T19:51
在 ubuntu 下抓 usb
By Poppy
at 2010-03-08T17:11
at 2010-03-08T17:11
改名..
By Annie
at 2010-03-08T16:50
at 2010-03-08T16:50
ubuntu 支援軟體
By Kyle
at 2010-03-08T16:17
at 2010-03-08T16:17
linux的ramfs常識問題orz
By Aaliyah
at 2010-03-08T10:04
at 2010-03-08T10:04