Teknoloji Haberleri
DH
forum
mini
Uygulama ile
aç
Uygulama ile Aç
Giriş
Kayıt
DH Anasayfa
İndirim Kodu
Ara
Popüler
Foruma Git
Hakkımızda
Destek
Mobil Sürüm
Standart Site Görünümü
Bu Konuda
Tüm Forumlar
Web Tasarım - Programlama
Yazılım Geliştirme
PHP / CGI
Bu Konuda
Bağlan:
Facebook
Google+
Twitter
Aşağı Git
Tüm Forumlar
Web Tasarım - Programlama
Yazılım Geliştirme
PHP / CGI
PHP SMTP HATASI
Bu konudaki kullanıcılar: 1 misafir
0
Cevap
45
Tıklama
0
Öne Çıkarma
1. sayfa
PHP SMTP HATASI
Cevap Yaz
Konuya Özel
Linkli Mesajlar
Seçkin Yorumlar
D
DH Anonim
Cevapla
Özel Mesaj
Şikayet
Mesaja Link
Takip Et
2 yıl
Yarbay
Konu Sahibi
Merhaba php ile formdan gelen verileri mail olarak göndermeye çalışıyorum ama bu hatayı alıyorum.Nasıl çözebilirim
< Resime gitmek için tıklayın >
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
"
;
}
?>
Cevap Yaz
1. sayfa
Tüm Forumlar
Web Tasarım - Programlama
Yazılım Geliştirme
PHP / CGI
PHP SMTP HATASI
DH Mobil uygulaması ile devam edin.
Mobil tarayıcınız ile mümkün olanların yanı sıra, birçok yeni ve faydalı özelliğe erişin.
App Store'dan
İndirin
Google Play'den
İndirin
Gizle ve güncelleme çıkana kadar tekrar gösterme.
Hizmet kalitesi için çerezleri kullanabiliriz. DH’ye girerek
kullanım izni vermiş
sayılırsınız. Fazlası için
veri politikamıza
göz atın.
< Resime gitmek için tıklayın >
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";
}
?>