2017-08-10 110 views
0

我在向用戶發送郵件後,其請求已被批准或拒絕。首先我使用smtp4dev它顯示郵件已發送,但沒有在我的郵箱中顯示郵件。當我停止使用該軟件時,此錯誤開始出現。我已經對php.ini和sendmain.ini進行了更改。請幫幫我。警告:郵件():無法連接到郵件服務器; localhost端口25

  <?php 
      session_start(); 
     if(!isset($_SESSION["Mlogin"]) && !isset($_SESSION["Mlogin"]) == "OK") 
    { 
     header("location:adminLogin.php"); 
     exit; 
    } 
    if(isset($_POST['disapprove'])) 
    { 
     include('connect.php'); 
     $tbl_name1 = "formC"; 

     $accountingNo = $_POST['accounting_No']; 
     $sql = oci_parse($conn, "SELECT * FROM formS where 
     accountingNo='$accountingNo'"); 
     $result = oci_execute($sql); 
     while($row = oci_fetch_array($sql,OCI_BOTH)) 
     { 
     $p_No = $row[1]; 
     } 

    $sql3 = oci_parse($conn,"select * from userC where p_No = $p_No"); 
    oci_execute($sql3); 
     while($row = oci_fetch_array($sql3,OCI_BOTH)) 
    { 
     $Uemail = $row[3]; 
    } 
     $sql2 = "DELETE FROM formS WHERE accountingNo = $accountingNo"; 
     $compiled1 = oci_parse($conn,$sql2); 
     $ex = oci_execute($compiled1,OCI_DEFAULT); 
    echo($sql2); 
    oci_commit($conn); 

     oci_close($conn); 
     $to = $Uemail; 
     $subject = "Request Disapproved"; 
     $txt = "Your payment request has been disapproved. Please contact the 
    person for reasons"; 
    $headers = "From: [email protected]"; 

     mail($to,$subject,$txt,$headers); 
     header("location:Cpanel.php?msg1=success");  
     } 
    else{ 
header("location:Cpanel.php?msg1=failed"); 
    } 
    ?> 
+0

嘗試端口587 –

+0

@PranavMS同樣的錯誤 –

+0

顯示你的代碼,然後我們可以幫助你 –

回答

相關問題