• 09-06-2014, 16:09:52
    #1
    arkadaşlar bu kodda mail adresimi nereye yazmalıyım yardımcı olabilirmisiniz ?

    <?php
    include('SMTPClass.php');

    $use_smtp = '0';
    $emailto = 'radyocuhuseyin@gmail.com';

    // retrieve from parameters
    $emailfrom = isset($_POST["radyocuhuseyin@gmail.com"]) ? $_POST["radyocuhuseyin@gmail.com'"] : "";
    $nocomment = isset($_POST["nocomment"]) ? $_POST["nocomment"] : "";
    $subject = 'Email from Zeences';
    $message = '';
    $response = '';
    $response_fail = 'Bilgilerinizi doğrulayın bir hata oluştu.';

    // Honeypot captcha
    if($nocomment == '') {

    $params = $_POST;
    foreach ( $params as $key=>$value ){

    if(!($key == 'ip' || $key == 'emailsubject' || $key == 'url' || $key == 'emailto' || $key == 'nocomment' || $key == 'v_error' || $key == 'v_email')){

    $key = ucwords(str_replace("-", " ", $key));

    if ( gettype( $value ) == "array" ){
    $message .= "$key: \n";
    foreach ( $value as $two_dim_value )
    $message .= "...$two_dim_value<br>";
    }else {
    $message .= $value != '' ? "$key: $value\n" : '';
    }
    }
    }

    $response = sendEmail($subject, $message, $emailto, $emailfrom);

    } else {

    $response = $response_fail;

    }

    echo $response;

    // Run server-side validation
    function sendEmail($subject, $content, $emailto, $emailfrom) {

    $from = $emailfrom;
    $response_sent = 'Teşekkürler. Yorumunuz alınmıştır.';
    $response_error = 'Hata. Lütfen tekrar deneyin.';
    $subject = filter($subject);
    $url = "Origin Page: ".$_SERVER['HTTP_REFERER'];
    $ip = "IP Address: ".$_SERVER["REMOTE_ADDR"];
    $message = $content."\n$ip\r\n$url";

    // Validate return email & inform admin
    $emailto = filter($emailto);

    // Setup final message
    $body = wordwrap($message);

    if($use_smtp == '1'){

    $SmtpServer = 'SMTP SERVER';
    $SmtpPort = 'SMTP PORT';
    $SmtpUser = 'SMTP USER';
    $SmtpPass = 'SMTP PASSWORD';

    $to = $emailto;
    $SMTPMail = new SMTPClient ($SmtpServer, $SmtpPort, $SmtpUser, $SmtpPass, $from, $to, $subject, $body);
    $SMTPChat = $SMTPMail->SendMail();
    $response = $SMTPChat ? $response_sent : $response_error;

    } else {

    // Create header
    $headers = "From: $from\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain; charset=utf-8\r\n";
    $headers .= "Content-Transfer-Encoding: quoted-printable\r\n";

    // Send email
    $mail_sent = @mail($emailto, $subject, $body, $headers);
    $response = $mail_sent ? $response_sent : $response_error;

    }
    return $response;
    }

    // Remove any un-safe values to prevent email injection
    function filter($value) {
    $pattern = array("/\n/", "/\r/", "/content-type:/i", "/to:/i", "/from:/i", "/cc:/i");
    $value = preg_replace($pattern, "", $value);
    return $value;
    }

    exit;

    ?>
  • 09-06-2014, 16:15:26
    #2
    Üyeliği durduruldu
    $emailto = 'radyocuhuseyin@gmail.com'; ve radyocuhuseyin@gmail.com olanları kendi mail adresin olarak değiştir.
  • 09-06-2014, 16:17:43
    #3
    <?php
    include('SMTPClass.php');

    $use_smtp = '0';
    $emailto = 'radyocuhuseyin@gmail.com'; mailin kime gönderileceği yani formum kime gideceği

    // retrieve from parameters
    $emailfrom = isset($_POST["radyocuhuseyin@gmail.com"]) ? $_POST["radyocuhuseyin@gmail.com'"] : ""; mail kimden geldi olarak gözüksün
    $nocomment = isset($_POST["nocomment"]) ? $_POST["nocomment"] : "";
    $subject = 'Email from Zeences'; e mailinizin konusu
    $message = '';mesaj içeriği
    $response = ''; başarıyla gönderilmiştir tarzında bir mesaj
    $response_fail = 'Bilgilerinizi doğrulayın bir hata oluştu.'; hata olursa hata mesajı
  • 09-06-2014, 16:46:11
    #4
    bu hatayı verdi

    Parse error: syntax error, unexpected T_STRING in /home/radyotik/public_html/marmara/contact/form-handler.php on line 5

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 16:46:11 -->-> Daha önceki mesaj 16:41:24 --

    $emailto = 'radyocuhuseyin@gmail.com'; bir yerde yazıyor zaten orayada mail adresimi yazdım ama hata veriyor uzun zamandır ara verdim kafam allak bullak oldu iyice
  • 09-06-2014, 16:46:25
    #5
    Selamlar, google form kullanmanızı öneririm. docs.google.com olması gerekiyor. Hata için doğru yere yazmışsınız belki chmod ayarlarını yapmanız gerekiyordur ?
  • 09-06-2014, 16:49:24
    #6
    birinizden rica etsem o formu bana düzelte bilirmi mail adresim radyocuhuseyin@gmail.com