請問為何下面這段永遠都是顯示true?
$send = mail("123@123.com.tw.xx","My subject","content");
if($send){
echo 'true';
}else{
echo 'false';
}
以前信寄不出去,程式能判斷到false,不知何時開始,接收到的只會是true!!
這個 true 指的是「mail server 接受寄信請求」
不是「寄出信件成功」或「收件者收到信」
Return Values
Returns true if the mail was successfully accepted for delivery, false otherwise.
It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination.