0
我不能讓PHP郵件發送電子郵件...apache,mercury32,php郵件。不能得到它的工作
所有這一切只是爲了測試我的PHP郵件功能在我的本地主機設置。 XAMPP-apache,mercury,mysql,windowXP
我很確定我安裝了水銀32正確的,如果我用它發送郵件到[email protected]它工作正常,我看到它發送並在我的雷鳥收件箱我爲它設立了。
的php.ini是我變得有點困惑
[mail function]
;---- I left this as is(out), since I AM using Mercury
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
;SMTP = localhost
;smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = [email protected]
;---- I created a root user in mercury
sendmail_from = [email protected]
; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesD:\xampp) fakemail and mailtodisk do not work correctly.
; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
;sendmail_path = "\"D:\xampp\sendmail\sendmail.exe\" -t"
; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:\xampp\mailoutput folder
;---- I left this as is(in), but I feel it should be commented out, but if I take out i get error in pho mail() code
sendmail_path = "D:\xampp\mailtodisk\mailtodisk.exe"
PHP代碼的郵件();
.....
$mailSubject = "Hello there!!!";
$mailFrom = "From: [email protected]" . "\r\n";
$mailTo = "[email protected]";
if (mail($mailTo, $mailSubject, $mailMessage, $mailFrom)){
echo("Message successfully sent! $mailTo");
}
else {
echo("Message delivery failed...");
}
郵件被髮送,但到哪裏?我永遠無法找到它
一些圖像: 測試汞。又到「文件>發送郵件」得到這個屏幕並創建了一個電子郵件,以測試上述圖像的
客戶端的電子郵件收件箱 - 結果/測試
在瀏覽器腳本輸出
您的郵件功能從這樣的眼光來看是正確的。是否正在打印交付失敗錯誤?也許你還有其他錯誤。沒有其他的想法 – Davit 2013-03-18 00:28:31
汞是最有可能保持原木,檢查出來;應該給你更多的見解。 – castis 2013-03-18 00:31:47
在MERCURYS.LOG中沒有任何意義 – rudy 2013-03-18 00:43:04