• 29-03-2014, 00:33:03
    #1
    İletişim bölümünü bu siteden 15 gün önce ücretlli yaptırdım ama domain almamıştım ozaman deneme şansımız olmamıştı. Şuanda da o arkadaşa ulaşamıyorum. iletişim bölümünden yazıyorum gönder diyorum gitmiyor. Gönder deyince de mail gitti diyor hata veriyor. Güvenlik kodu yok hiç birşey yazmadan gönder deyince yinede mail gönderildi diyor (Biri mailleri doldururmu). Yardım edebilirmisiniz. Kodda mail@mail.com yazan kısmı bilerek yazdım konuyu paylaşmak için.


    Aşağıdaki send.php onun altındakide smtp.php


    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
    
    <?php
    ob_start();
    /////////////////DIKKAT-DIKKAT/////////////////////////////
    //ALTTAKi BOLUME MAiL ADRESiNiZ VE MAiL SiFRENiZi YAZINIZ//
    ///////////////////////////////////////////////////////////
    $isim=$_POST['isim'];
    $Telefon=$_POST['telefon'];
    $email=$_POST['email'];
    $mesaj=$_POST['mesaj'];
    
    
    $mail_adresiniz	= "mail@mail.com";
    $mail_sifreniz	= "12345";
    $gidecek_adres	= $email;
    $domain_adresi	= "xxx.com";	//www olmadan yazınız
    
    ///////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    
    
    require("include/class.php");
    $mail = new PHPMail();
    $mail->Host       = "smtp.".$domain_adresi;
    $mail->SMTPAuth   = true;
    $mail->Username   = $mail_adresiniz;
    $mail->Password   = $mail_sifreniz;
    $mail->IsSMTP();
    $mail->AddAddress($gidecek_adres);
    $mail->From       = $mail_adresiniz;
    $mail->FromName   = $mail_adresiniz;
    $mail->Subject    = $mesaj." (".$isim.") dan mesajiniz var.";
    $mail->Body       = $email."\n".$mesaj;
    $mail->AltBody    = "";
    
    if(!$mail->Send()){
    	echo "Mesajiniz Gönderildi";
      
     echo "<meta http-equiv=\"refresh\" content=\"1;URL=index.html\" />";
    }
    ?>

    smtp kodları

    <?php
    
    //******************************************************************************************************************//
    //                                  Kod'lar da degisiklik yapmamaniz tavsiye edilir.                                //
    //******************************************************************************************************************//
    
    
    class SMTP {
    
      public $SMTP_PORT = 25;
    
      public $CRLF = "\r\n";
    
      public $do_debug;
    
      public $do_verp = false;
    
      private $smtp_conn;
    
      private $error;
    
      private $helo_rply;
    
      public function __construct() {
        $this->smtp_conn = 0;
        $this->error = null;
        $this->helo_rply = null;
    
        $this->do_debug = 0;
      }
    
      public function Connect($host,$port=0,$tval=30) {
    
        $this->error = null;
    
        if($this->connected()) {
          $this->error = array("error" => "Already connected to a server");
          return false;
        }
    
        if(empty($port)) {
          $port = $this->SMTP_PORT;
        }
    
        $this->smtp_conn = fsockopen($host,
                                     $port,
                                     $errno,
                                     $errstr,
                                     $tval);
        if(empty($this->smtp_conn)) {
          $this->error = array("error" => "Failed to connect to server",
                               "errno" => $errno,
                               "errstr" => $errstr);
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": $errstr ($errno)" . $this->CRLF;
          }
          return false;
        }
    
        if(substr(PHP_OS, 0, 3) != "WIN")
         socket_set_timeout($this->smtp_conn, $tval, 0);
    
        $announce = $this->get_lines();
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce;
        }
    
        return true;
      }
    
      public function StartTLS() {
        $this->error = null; # to avoid confusion
    
        if(!$this->connected()) {
          $this->error = array("error" => "Called StartTLS() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"STARTTLS" . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 220) {
          $this->error =
             array("error"     => "STARTTLS not accepted from server",
                   "smtp_code" => $code,
                   "smtp_msg"  => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
          }
          return false;
        }
    
        if(!stream_socket_enable_crypto($this->smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
          return false;
        }
    
        return true;
      }
    
      public function Authenticate($username, $password) {
        fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($code != 334) {
          $this->error =
            array("error" => "AUTH not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
    
        fputs($this->smtp_conn, base64_encode($username) . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($code != 334) {
          $this->error =
            array("error" => "Username not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
    
        fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($code != 235) {
          $this->error =
            array("error" => "Password not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
    
        return true;
      }
    
      public function Connected() {
        if(!empty($this->smtp_conn)) {
          $sock_status = socket_get_status($this->smtp_conn);
          if($sock_status["eof"]) {
            if($this->do_debug >= 1) {
                echo "SMTP -> NOTICE:" . $this->CRLF .
                     "EOF caught while checking if connected";
            }
            $this->Close();
            return false;
          }
          return true;
        }
        return false;
      }
    
      public function Close() {
        $this->error = null;
        $this->helo_rply = null;
        if(!empty($this->smtp_conn)) {
          fclose($this->smtp_conn);
          $this->smtp_conn = 0;
        }
      }
    
      public function Data($msg_data) {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                  "error" => "Called Data() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"DATA" . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 354) {
          $this->error =
            array("error" => "DATA command not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
    
        $msg_data = str_replace("\r\n","\n",$msg_data);
        $msg_data = str_replace("\r","\n",$msg_data);
        $lines = explode("\n",$msg_data);
    
        $field = substr($lines[0],0,strpos($lines[0],":"));
        $in_headers = false;
        if(!empty($field) && !strstr($field," ")) {
          $in_headers = true;
        }
    
        $max_line_length = 998;
    
        while(list(,$line) = @each($lines)) {
          $lines_out = null;
          if($line == "" && $in_headers) {
            $in_headers = false;
          }
          while(strlen($line) > $max_line_length) {
            $pos = strrpos(substr($line,0,$max_line_length)," ");
    
            if(!$pos) {
              $pos = $max_line_length - 1;
              $lines_out[] = substr($line,0,$pos);
              $line = substr($line,$pos);
            } else {
              $lines_out[] = substr($line,0,$pos);
              $line = substr($line,$pos + 1);
            }
    
            if($in_headers) {
              $line = "\t" . $line;
            }
          }
          $lines_out[] = $line;
    
          while(list(,$line_out) = @each($lines_out)) {
            if(strlen($line_out) > 0)
            {
              if(substr($line_out, 0, 1) == ".") {
                $line_out = "." . $line_out;
              }
            }
            fputs($this->smtp_conn,$line_out . $this->CRLF);
          }
        }
    
        fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 250) {
          $this->error =
            array("error" => "DATA not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
        return true;
      }
    
      public function Expand($name) {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                "error" => "Called Expand() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 250) {
          $this->error =
            array("error" => "EXPN not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
    
        $entries = explode($this->CRLF,$rply);
        while(list(,$l) = @each($entries)) {
          $list[] = substr($l,4);
        }
    
        return $list;
      }
    
      public function Hello($host="") {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                "error" => "Called Hello() without being connected");
          return false;
        }
    
        if(empty($host)) {
          $host = "localhost";
        }
    
        if(!$this->SendHello("EHLO", $host))
        {
          if(!$this->SendHello("HELO", $host))
              return false;
        }
    
        return true;
      }
    
      private function SendHello($hello, $host) {
        fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply;
        }
    
        if($code != 250) {
          $this->error =
            array("error" => $hello . " not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
    
        $this->helo_rply = $rply;
    
        return true;
      }
    
      public function Help($keyword="") {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                  "error" => "Called Help() without being connected");
          return false;
        }
    
        $extra = "";
        if(!empty($keyword)) {
          $extra = " " . $keyword;
        }
    
        fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 211 && $code != 214) {
          $this->error =
            array("error" => "HELP not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
    
        return $rply;
      }
    
      public function Mail($from) {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                  "error" => "Called Mail() without being connected");
          return false;
        }
    
        $useVerp = ($this->do_verp ? "XVERP" : "");
        fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 250) {
          $this->error =
            array("error" => "MAIL not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
        return true;
      }
    
      public function Noop() {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                  "error" => "Called Noop() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"NOOP" . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 250) {
          $this->error =
            array("error" => "NOOP not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
        return true;
      }
    
      public function Quit($close_on_error=true) {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                  "error" => "Called Quit() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"quit" . $this->CRLF);
    
        $byemsg = $this->get_lines();
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg;
        }
    
        $rval = true;
        $e = null;
    
        $code = substr($byemsg,0,3);
        if($code != 221) {
          $e = array("error" => "SMTP server rejected quit command",
                     "smtp_code" => $code,
                     "smtp_rply" => substr($byemsg,4));
          $rval = false;
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $e["error"] . ": " .
                     $byemsg . $this->CRLF;
          }
        }
    
        if(empty($e) || $close_on_error) {
          $this->Close();
        }
    
        return $rval;
      }
    
      public function Recipient($to) {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                  "error" => "Called Recipient() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 250 && $code != 251) {
          $this->error =
            array("error" => "RCPT not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
        return true;
      }
    
      public function Reset() {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                  "error" => "Called Reset() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"RSET" . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 250) {
          $this->error =
            array("error" => "RSET failed",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
    
        return true;
      }
    
      public function Send($from) {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                  "error" => "Called Send() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"SEND FROM:" . $from . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 250) {
          $this->error =
            array("error" => "SEND not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
        return true;
      }
    
      public function SendAndMail($from) {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
              "error" => "Called SendAndMail() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 250) {
          $this->error =
            array("error" => "SAML not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
        return true;
      }
    
      public function SendOrMail($from) {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
              "error" => "Called SendOrMail() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"SOML FROM:" . $from . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 250) {
          $this->error =
            array("error" => "SOML not accepted from server",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
        return true;
      }
    
      public function Turn() {
        $this->error = array("error" => "This method, TURN, of the SMTP ".
                                        "is not implemented");
        if($this->do_debug >= 1) {
          echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF;
        }
        return false;
      }
    
      public function Verify($name) {
        $this->error = null;
    
        if(!$this->connected()) {
          $this->error = array(
                  "error" => "Called Verify() without being connected");
          return false;
        }
    
        fputs($this->smtp_conn,"VRFY " . $name . $this->CRLF);
    
        $rply = $this->get_lines();
        $code = substr($rply,0,3);
    
        if($this->do_debug >= 2) {
          echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }
    
        if($code != 250 && $code != 251) {
          $this->error =
            array("error" => "VRFY failed on name '$name'",
                  "smtp_code" => $code,
                  "smtp_msg" => substr($rply,4));
          if($this->do_debug >= 1) {
            echo "SMTP -> ERROR: " . $this->error["error"] .
                     ": " . $rply . $this->CRLF;
          }
          return false;
        }
        return $rply;
      }
    
      private function get_lines() {
        $data = "";
        while($str = @fgets($this->smtp_conn,515)) {
          if($this->do_debug >= 4) {
            echo "SMTP -> get_lines(): \$data was \"$data\"" .
                     $this->CRLF;
            echo "SMTP -> get_lines(): \$str is \"$str\"" .
                     $this->CRLF;
          }
          $data .= $str;
          if($this->do_debug >= 4) {
            echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF;
          }
          if(substr($str,3,1) == " ") { break; }
        }
        return $data;
      }
    
    }
    
    ?>
  • 29-03-2014, 01:05:23
    #2
    Kurumsal Üye
    Sunucuda phpmail yasaklı olabilir veya,

    mail->Host*******=*"smtp.".$domain_adresi;*

    Kısmı hatalı olabilir, smtp bağlantısı kurulmasa bile hata vermez sanırım kodlamaya göre.
  • 29-03-2014, 01:09:12
    #3
    Alıntı
    if(!$mail->Send()){
    echo "Mesajiniz Gönderildi";

    echo "<meta http-equiv=\"refresh\" content=\"1;URL=index.html\" />";
    }
    bi kere burada hata var. Eğer mesaj gitmezse "!" demiş Mesajınız gönderildi yazmış

    Alıntı
    echo "Mesajiniz Gönderildi";
    echo "Mailer Error: " . $mail->ErrorInfo;
    bunu yazıp hata kodunu paylaşırmısın?
  • 29-03-2014, 01:19:26
    #4
    Yaptım ana sayfaya yönlenmiyor şimdi bu hatayı veriyor


    Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/xxx/public_html/include/smtp.php on line 49
    
    Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.xxx.com:25 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home/xxx/public_html/include/smtp.php on line 49
    Mesajiniz GönderildiMailer Error: SMTP Error: Could not connect to SMTP host.
  • 29-03-2014, 01:24:40
    #5
    Kurumsal Üye
    Bahsettigim gibi, smtp bağlantısı kurulamiyor.
  • 29-03-2014, 01:35:28
    #6
    <?php

    $isim=$_POST['isim'];
    $telefon=$_POST['telefon'];
    $email=$_POST['email'];
    $gelenmesaj=$_POST['mesaj'];


    $kime="emailadresiniz"; //buraya mail adresinizi yazın
    $konu="Mail Baslik"; // buraya mail başlığı



    $mesaj="
    Isim: $isim<br>
    Telefon: $telefon<br>
    Email: $email<br>
    Mesajiniz: $gelenmesaj";


    $kontrol=mail($kime,$konu,$mesaj);

    if($kontrol){
    echo "Mesajiniz Gönderildi";
    echo "<meta http-equiv=\"refresh\" content=\"1;URL=index.html\" />";
    }

    ?>


    smtp şeklinde hata nerde bunu bulamadım ama geçici çözüm olarak isterseniz send.php yi bu şekilde değiştirerek çözebilirsiniz

    edit : kodlar düzeltilti
  • 29-03-2014, 01:42:41
    #7
    U_uR adlı üyeden alıntı: mesajı görüntüle
    <?php

    $isim=$_POST['isim'];
    $telefon=$_POST['telefon'];
    $email=$_POST['email'];
    $gelenmesaj=$_POST['mesaj'];

    $kime="emailadresiniz" //buraya mail adresinizi yazın
    $konu="Mail Baslik"; // buraya mail başlığı
    $mesaj="
    Isim: $isim<br>
    Telefon: $telefon<br>
    Email: $email<br>
    Mesajiniz: $gelenmesaj";


    $kontrol=mail($kime,$konu,$mesaj);

    if($kontrol){
    echo "Mesajiniz Gönderildi";
    echo "<meta http-equiv=\"refresh\" content=\"1;URL=index.html\" />";
    }

    ?>


    smtp şeklinde hata nerde bunu bulamadım ama geçici çözüm olarak isterseniz send.php yi bu şekilde değiştirerek çözebilirsiniz

    edit : kodlar düzeltilti
    Hocam bu hatayı aldım sizdekini attım şimdi. editlediğiniz halini

    Parse error: syntax error, unexpected T_VARIABLE in /home/xxx/public_html/send.php on line 11
  • 29-03-2014, 01:47:21
    #8
    kodları düzenlemiştim sanırım eski halini atmış olabilirsiniz tekrar dener misiniz
  • 29-03-2014, 01:47:32
    #9
    Edit : yapamadım bi sn