Şimdi Ara

PHP SMTP SORUNU

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
1 Misafir - 1 Masaüstü
5 sn
2
Cevap
0
Favori
121
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • merhaba php ile formdan gelen verileri smtp olarak göndermek istiyoruma ama hata alıyorum. Sorunu nasıl çözebilirim

    PHP SMTP SORUNU


    include "class.phpmailer.php";

    include "class.smtp.php";

    $isim = $_POST['isim_soyisim'];

    $telefon = $_POST['telefon'];

    $mail = $_POST['mail'];

    $adres = $_POST['acik_adres'];

    $il = $_POST['il'];

    $ilce = $_POST['ilce'];

    $mahalle = $_POST['mahalle'];

    $cadde = $_POST['sokak'];

    $ada = $_POST['ada'];

    $parsel = $_POST['parsel'];

    $tesisat_turleri = $_POST['tesisat_tur'];

    $tuketici_sinif = $_POST['sinif'];

    $cati_alani = $_POST['cati'];

    //$son_e_fatura = $_POST['son_fatura'];

    //$tapu = $_POST['tapu'];

    /*

    $foto1 = $_POST['fotobir'];

    $foto2 = $_POST['fotoiki'];

    $foto3 = $_POST['fotouc'];

    $foto4 = $_POST['fotodort'];

    $foto5 = $_POST['fotobes'];*/

    $jsonil = $il;

    $jsonilce = $ilce;

    $jsonmahalle = $mahalle;

    $jsoncadde = $cadde;

    $datail = json_decode($jsonil);

     $yeniil=  $datail->value;

    $datailce = json_decode($jsonilce);

    $yeniilce =  $datailce->value;

    $datamahalle = json_decode($jsonmahalle);

    $yenimahalle = $datamahalle->value;

    $datacadde = json_decode($jsoncadde);

    $yenicadde = $datacadde->value;

    // echo $yeniil;

    // echo $yeniilce;

    // echo $yenimahalle;

    // echo $yenicadde;


    $mail = new PHPMailer();

           


    $mail->IsSMTP(); // enable SMTP


    $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only

    $mail->SMTPAuth = true; // authentication enabled

    $mail->SMTPSecure = 'TLS'; // secure transfer enabled REQUIRED for Gmail

    $mail->Host = "smtp.yandex.com";

    $mail->Port = 465; // or 587

    $mail->IsHTML(true);

    $mail->Username = "lastdigitalhelp@yandex.com";

    $mail->Password = "fkbm2394";

    $mail->SetFrom("azrodo211@protonmail.ch");

    $mail->Subject = "Test";

    $mail->Body = "hello";

    $mail->AddAddress("azrodo21@gmail.comm");


     if(!$mail->Send()) {

        echo "Mailer Error: " . $mail->ErrorInfo;

     } else {

        echo "Message has been sent";

     }

    ?>








  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.