-
Notifications
You must be signed in to change notification settings - Fork 0
/
iletisimsonuc.php
87 lines (64 loc) · 2.47 KB
/
iletisimsonuc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'Frameworks/PHPMailer/src/Exception.php';
require 'Frameworks/PHPMailer/src/PHPMailer.php';
require 'Frameworks/PHPMailer/src/SMTP.php';
if (isset($_POST["IsimSoyisim"])) {
$GelenIsimSoyisim = Guvenlik($_POST["IsimSoyisim"]);
} else {
$GelenIsimSoyisim = "";
}
if (isset($_POST["EmailAdresi"])) {
$GelenEmailAdresi = Guvenlik($_POST["EmailAdresi"]);
} else {
$GelenEmailAdresi = "";
}
if (isset($_POST["TelefonNumarasi"])) {
$GelenTelefonNumarasi = Guvenlik($_POST["TelefonNumarasi"]);
} else {
$GelenTelefonNumarasi = "";
}
if (isset($_POST["Mesaj"])) {
$GelenMesaj = Guvenlik($_POST["Mesaj"]);
} else {
$GelenMesaj = "";
}
if (($GelenIsimSoyisim != "") and ($GelenEmailAdresi != "") and ($GelenTelefonNumarasi != "") and ($GelenMesaj != "")) {
$MailIcerigiHazirla = "İsim Soyisim : " . $GelenIsimSoyisim . "<br />E-Mail Adresi : " . $GelenEmailAdresi . "<br />Telefon Numarası : " . $GelenTelefonNumarasi . "<br />Mesaj : " . $GelenMesaj;
$MailGonder = new PHPMailer(true);
try {
$MailGonder->SMTPDebug = 0;
$MailGonder->isSMTP();
$MailGonder->Host = DonusumleriGeriDondur($SiteEmailHostAdresi);
$MailGonder->SMTPAuth = true;
$MailGonder->CharSet = "UTF-8";
$MailGonder->Username = DonusumleriGeriDondur($SiteEmailAdresi);
$MailGonder->Password = DonusumleriGeriDondur($SiteEmailSifresi);
$MailGonder->SMTPSecure = 'tls';
$MailGonder->Port = 587;
$MailGonder->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
$MailGonder->setFrom(DonusumleriGeriDondur($SiteEmailAdresi), DonusumleriGeriDondur($SiteAdi));
$MailGonder->addAddress(DonusumleriGeriDondur($SiteEmailAdresi), DonusumleriGeriDondur($SiteAdi));
$MailGonder->addReplyTo($GelenEmailAdresi, $GelenIsimSoyisim);
$MailGonder->isHTML(true);
$MailGonder->Subject = DonusumleriGeriDondur($SiteAdi) . ' İletişim Formu Mesajı';
$MailGonder->MsgHTML($MailIcerigiHazirla);
$MailGonder->send();
header("Location:index.php?SK=18");
exit();
} catch (Exception $e) {
header("Location:index.php?SK=19");
exit();
}
} else {
header("Location:index.php?SK=20");
exit();
}
?>