1 頁 (共 1 頁)

[問題]會員註冊自動發e-mail有問題,請協助

發表於 : 2004-01-01 13:50
altezza
會員註冊自動發e-mail部分有問題,請協助\r

------------------------------------------------------------------------------------
●架設主機作業系統:Windows 2000 Server
●快速架站程式:Appserv(phpBB論壇架設寶典的版本)。(後來因故改為IIS)
●您的上網方式:固接專線
●您安裝的程式:先用Appserv後,改為 IIS + php + MySql
●您的 phpBB2 版本:phpBB (2.0.4)。
●錯誤代碼:
PHP Warning: send(C:\inetpub\wwwroot\typc\forum\includes\smtp.php): failed to open stream: Invalid argument in C:\Inetpub\wwwroot\typc\forum\includes\emailer.php on line 213 PHP Warning: send(): Failed opening 'C:\inetpub\wwwroot ypc\forum\includes\smtp.php' for inclusion (include_path='.;c:\php4\pear') in C:\Inetpub\wwwroot\typc\forum\includes\emailer.php on line 213 PHP Fatal error: Call to undefined function: smtpmail() in C:\Inetpub\wwwroot\typc\forum\includes\emailer.php on line 216
●錯誤狀態:會員註冊後,無法發e-mail自動通知,而且顯示上述之錯誤訊息;但是,會員註冊是有效的,可是會員不知道

補充:
1. 主要網頁是用IIS,利用phpBB來做其中之討論區
2. 原本之mail server為同一台電腦的exchange,後來另外架一台mail server,用linux的,相關設定也改了,可是,就是沒有辦法。
3. 還需要提供哪些訊息,請告知。請各位大大予以協助。

發表於 : 2004-01-01 14:00
S-h L
是電子郵件設定錯誤了,此問題您用搜尋功能可以找到有關此的討論

發表於 : 2004-01-01 15:41
messagebox
這絕對不是郵件設定錯誤那麼簡單~~

我比較覺得
include這個檔案C:\inetpub\wwwroot\typc\forum\includes\smtp.php發生錯誤~~~
但不是檔案不存在~~

可能是send()這個函式有問題~~
請試著測試回傳值~~~

因為我沒有IIS可以測試~~
不過我建議你從這方面來除錯~~

如果解決~~也希望可以將正確原因張貼出來~~
造福大家~~

發表於 : 2004-01-01 16:06
altezza
messagebox 寫:這絕對不是郵件設定錯誤那麼簡單~~

我比較覺得
include這個檔案C:\inetpub\wwwroot\typc\forum\includes\smtp.php發生錯誤~~~
但不是檔案不存在~~

可能是send()這個函式有問題~~
請試著測試回傳值~~~
請問怎樣測試回傳值?

我曾經試著打開smtp.php以及emailer.php兩個檔,卻不知怎樣改才會正確

發表於 : 2004-01-01 16:15
messagebox
如果可以~~希望你將emiler.php裡的
function send()函式整段貼出來~~

不過我也不敢保證一定能解決~~

因為我真的還是想不懂錯誤的原因~~

發表於 : 2004-01-01 16:46
altezza
messagebox 寫:如果可以~~希望你將emiler.php裡的
function send()函式整段貼出來~~
function send()
{
global $phpEx, $phpbb_root_path;

if ( $this->address == NULL )
{
message_die(GENERAL_ERROR, 'No email address set', '', __LINE__, __FILE__);
}

if ( !$this->parse_email() )
{
return false;
}

//
// Add date and encoding type
//
$universal_extra = "MIME-Version: 1.0
Content-type: text/plain; charset=" . $this->encoding . "
Content-transfer-encoding: 8bit
Date: " . gmdate('D, d M Y H:i:s', time()) . " UT
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: PHP
";
$this->extra_headers = $universal_extra . trim($this->extra_headers);

if ( $this->use_smtp )
{
if ( !defined('SMTP_INCLUDED') )
{
include("C:\\\inetpub\wwwroot\typc\forum\includes\smtp.php" . $phpEx);
}

$result = smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers);
}
else
{
$result = @mail($this->address, $this->subject, $this->msg, $this->extra_headers);
}

if ( !$result )
{
message_die(GENERAL_ERROR, 'Failed sending email :: ' . $result, '', __LINE__, __FILE__);
}

return true;
}
請指導

發表於 : 2004-01-01 17:37
messagebox
我試著依你的方式呼叫~~~
不會出現這種錯誤~~

我在想是不是IIS的權限問題~~
因為我在APACHE都不會出這個錯~~

你之前再APACHE時~是正常的嗎~~
是轉換到IIS才出現的問題嗎~~

發表於 : 2004-01-01 18:01
altezza
messagebox 寫:我試著依你的方式呼叫~~~
不會出現這種錯誤~~

我在想是不是IIS的權限問題~~
因為我在APACHE都不會出這個錯~~

你之前再APACHE時~是正常的嗎~~
是轉換到IIS才出現的問題嗎~~
是轉換到IIS後,才出現的

唉,打算備份資料後,重新灌
看看是否會有此問題

發表於 : 2004-01-01 18:03
messagebox
altezza 寫: 是轉換到IIS後,才出現的

唉,打算備份資料後,重新灌
看看是否會有此問題
教你一招~~關掉後台用SMTP寄送郵件選項~~

然後到PHP.INI設定你的SMTP SERVER~
讓PHPBB用mail()去送信~~~