php e-posta komut dosyası e-posta gönderilmesi

0 Cevap php

Bir web sitesinde bir form bir e-posta göndermek için bir komut dosyası var. Ben kod iyi olduğunu biliyorum - Ben daha önce iki farklı hosting firmaları ile test ettik. Bir hosting şirketi aksine bu kez ben, bir gerçek bir sunucu üzerinde kullanıyorum. Temel olarak kullanıcı, formu doldurur tıklama göndermek ve mesaj gönderildi onay sayfasını alır. Tek şey, hiçbir e-posta geliyor olduğunu. İşte betik:

 $nickname = $_REQUEST['nickname'] ;
  $email = $_REQUEST['email'] ;
  $tel = $_REQUEST['tel'] ;
      $comp = $_REQUEST['comp'] ;
  $message = $_REQUEST['message'] ;


// Let's check if all fields are filled in!
if(empty($nickname) || empty($email) || empty($comp))
{
$error = "All of the required fields have not been completed, <a href=\"javascript:history.go(-1)\">please click here to go back.</a>";
}
else
{
$content= "$nickname has sent you an e-mail from XXX
Query:
$message
You can contact $nickname via Email: $email. <br />Other relevant details of individual: <br />Telephone Number: $tel <br />Company: $comp";

mail( "user@gmail.com", "Query", $content, "From: $email"); //first thing has to be address it is going to, then what the subject of the mail should be, the content and a from address which will be the query submitter.
echo  "<h2>$nickname</h2><br></br>
    Your query has been succesfully sent. <br></br><br></br>
    We will deal with this query and be in touch as soon as possible.<br></br><br></br><br></br> 
    The contact details you submitted are: <br></br><br></br>
    <strong>Email:</strong>&nbsp; $email<br></br><br></br>
    <strong>Phone:</strong>&nbsp; $tel<br></br><br></br>
    <strong>Company:</strong>&nbsp; $comp<br></br><br></br>
    <a //href=\"javascript:history.go(-1)\"> Click here to return to the contact page.</a></br>";
}; 

?>

Bu da önemli olmadığını bilmiyorum ama yakın zamana kadar, PHP sunucu üzerinde çalışmak ve fiil izin söyleyerek bir HTTP hatası 405 hatası verdi olmazdı. Bu beri çözüldü.

0 Cevap